import { Shader } from '../core/Shader.js' export const SimpleShader = () => { const VertexCode = ` precision mediump float; attribute vec3 position; attribute vec3 normal; attribute vec3 uv; uniform mat4 proj; uniform mat4 view; uniform mat4 tran; varying vec3 color; void main() { color.xyz = (position.xyz + 1.0) / 2.0; gl_Position = proj * view * tran * vec4(position, 1.0); } ` const FragmentCode = ` precision mediump float; varying vec3 color; void main() { gl_FragColor = vec4(color, 1.0); } ` return new Shader(VertexCode, FragmentCode) }