Advertisement
Guest User

vert.glsl

a guest
Mar 1st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #version 410
  2.  
  3. uniform mat4 mvpMatrix;
  4. uniform mat4 modelMatrix;
  5. uniform mat3 normalMatrix;
  6.  
  7. layout (location = 0) in vec3 in_position;
  8. layout (location = 2) in vec3 in_color;
  9. layout (location = 1) in vec3 in_normal;
  10.  
  11. layout (location = 0) out vec3 vs_out_color;
  12. layout (location = 1) out vec3 vs_out_N;
  13. layout (location = 2) out vec3 vs_out_posWCS;
  14.  
  15. void main(void)
  16. {
  17. vs_out_N = in_normal;
  18. vs_out_color = in_color;
  19.  
  20. // TODO Position in Weltkooridinaten berechnen an passende Variable uebergeben und gl_Position setzen
  21.  
  22. vs_out_posWCS = modelMatrix * vec4(in_position, 1.0).xyz;
  23. gl_Position = mvpMatrix * vec4(in_position, 1.0);
  24.  
  25. // END TODO
  26.  
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement