3dexperiments/assets/shaders/basic.vs

17 lines
356 B
Plaintext
Raw Normal View History

precision mediump float;
attribute vec3 aVertexPosition;
attribute vec2 aTexCoords;
uniform mat4 uModelMatrix;
uniform mat4 uViewMatrix;
uniform mat4 uProjectionMatrix;
varying vec2 uv;
void main() {
vec4 worldPosition = uModelMatrix * vec4(aVertexPosition, 1.0);
gl_Position = uProjectionMatrix * uViewMatrix * worldPosition;
uv = aTexCoords;
}