Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //uniform mat4 projectionMatrix;
- //uniform mat4 viewMatrix;
- //uniform mat4 modelMatrix;
- uniform vec2 u_resolution; // screen size (px) {width, height}
- uniform vec2 u_mouse; // mouse cursor position (px) {x, y}
- uniform float u_time; // time in milliseconds since the beginning
- uniform float u_deltaTime; // time in milliseconds since the last frame
- //attribute vec3 position;
- //attribute vec2 uv;
- varying vec2 vUV;
- void main() {
- vec4 modelPosition = modelMatrix * vec4(position, 1.0);
- vec4 viewPosition = viewMatrix * modelPosition;
- vec4 projectedPosition = projectionMatrix * viewPosition;
- gl_Position = projectedPosition;
- //gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);
- vUV = uv;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement