hnOsmium0001

color by vert

Oct 14th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. // Vert
  3. // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  4. #version 330 core
  5.  
  6. layout (location = 0) in vec3 pos;
  7. out vec4 vertColor;
  8.  
  9. void main()
  10. {
  11. gl_Position = vec4(pos, 1.0);
  12. vertColor = vec4(0.5, 0.0, 0.0, 1.0);
  13. }
  14.  
  15. // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16. // Frag
  17. // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  18. #version 330 core
  19.  
  20. in vec4 vertColor;
  21. out vec4 fragColor;
  22.  
  23. void main()
  24. {
  25. fragColor = vertColor;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment