Advertisement
Guest User

Untitled

a guest
Jun 30th, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. varying vec3 normal; //Normal data
  2. varying vec3 vertex; //Vertex location for next stage
  3.  
  4. void main(){
  5. vertex = vec3(gl_ModelViewMatrix * gl_Vertex); //Vertex location init
  6. normal = normalize(gl_NormalMatrix * gl_Normal); //Normal data init
  7.  
  8. gl_FrontColor = gl_Color; //Vertex color for next stage
  9. gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex; //Final position using built-in matrices because I'm lazy :P
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement