Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- varying vec3 normal; //Normal data
- varying vec3 vertex; //Vertex location for next stage
- void main(){
- vertex = vec3(gl_ModelViewMatrix * gl_Vertex); //Vertex location init
- normal = normalize(gl_NormalMatrix * gl_Normal); //Normal data init
- gl_FrontColor = gl_Color; //Vertex color for next stage
- gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; //Final position using built-in matrices because I'm lazy :P
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement