Advertisement
Mudbill

Basic OpenGL Vertex Shader

Sep 17th, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330 core
  2.  
  3. /* Input from OpenGL */
  4. layout (location = 0) in vec3 position;
  5. layout (location = 1) in vec2 texCoord;
  6.  
  7. /* Output to fragment shader */
  8. out vec2 vtxCoord;
  9.  
  10. void main()
  11. {
  12.     gl_Position = vec4(position.x, position.y, position.z, 1.0);
  13.     vtxCoord = texCoord;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement