Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 regels
476 B

  1. #version 150
  2. in vec3 position;
  3. in vec3 normal;
  4. in vec4 color;
  5. uniform mat4 projection;
  6. uniform mat4 view;
  7. out vec4 fPosition;
  8. out vec4 fColor;
  9. out vec4 fLightPosition;
  10. out vec3 fNormal;
  11. void main(void)
  12. {
  13. fPosition = view * vec4(position,1.0);
  14. fLightPosition = view * vec4(0.0,0.0,1.0,1.0);
  15. fColor = color;
  16. fNormal = vec3(view * vec4(normal,0.0));
  17. gl_Position = projection * fPosition;
  18. /*gl_Position.x *= 1000.0f;*/
  19. /*gl_Position.y = 0.0;*/
  20. }