Advertisement
acampbellblack

Untitled

Jan 22nd, 2024
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // each shader begins with a declaration of its version
  2. #version 330 core
  3.  
  4. layout (location = 0) in vec3 position_in; // we declare input vertex attribues, we only a single one (position) now
  5. layout (location = 1) in vec2 texture_coordinates_in;
  6.  
  7. uniform mat4 model;
  8. uniform mat4 view;
  9. uniform mat4 projection;
  10.  
  11. out vec2 texture_coordinates;
  12.  
  13. void main()
  14. {
  15.     gl_Position = projection * view * model * vec4(position_in, 1.0); // gl_Position is the output position of each vertex
  16.     texture_coordinates = texture_coordinates_in;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement