Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Vertex
  2. #version 330 core
  3.  
  4. layout (location = 0) in vec3 aPos;
  5. layout (location = 1) in vec4 aColor;
  6. layout (location = 2) in vec2 inTexCoord;
  7.  
  8. out vec4 ourColor;
  9. //out vec2 vtxTexCoord;
  10.  
  11. uniform mat4 transMtx;
  12.  
  13. void main()
  14. {
  15.     // Set up position and color
  16.     gl_Position = transMtx * vec4(aPos, 1.0);
  17.     ourColor = aColor;
  18.  
  19.     // Calculate texcoord
  20.     //vtxTexCoord = inTexCoord;
  21. }
  22.  
  23. //Frag
  24. #version 330 core
  25. in vec4 ourColor;
  26.  
  27. void main()
  28. {
  29.     gl_FragColor = ourColor;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement