Advertisement
SrinjoySS01

Shader.glsl

Dec 11th, 2020
2,194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #type vertex
  2. #version 410 core
  3. layout(location = 0) in vec4 position;
  4. layout(location = 1) in vec4 aColor;
  5. layout(location = 2) in vec2 textCoords;
  6. out vec4 fColor;
  7. out vec2 vTexCoord;
  8. void main() {
  9.     fColor = aColor;
  10.     vTexCoord = textCoords;
  11.     gl_Position = position;
  12. }
  13.  
  14. #type fragment
  15. #version 410 core
  16. out vec4 color;
  17. in vec2 vTexCoord;
  18. in vec4 fColor;
  19. uniform sampler2D uTexture;
  20. uniform vec4 uColor;
  21.  
  22. void main() {
  23.     color = texture(uTexture, vTexCoord);
  24. //    color = fColor;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement