Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #shader vertex
  2. #version 330 core
  3.  
  4. layout(location = 0) in vec4 position;
  5. layout(location = 1) in vec2 texCoord;
  6.  
  7. out vec2 v_TexCoord;
  8.  
  9. void main()
  10. {
  11.     gl_Position = position;
  12.     v_TexCoord = texCoord;
  13. };
  14.  
  15. #shader fragment
  16. #version 330 core
  17.  
  18. layout(location = 0) out vec4 color;
  19.  
  20. in vec2 v_TexCoord;
  21.  
  22. uniform vec4 u_Color;
  23. uniform sampler2D u_Texture;
  24.  
  25. void main()
  26. {
  27.     vec4 texColor = texture(u_Texture, v_TexCoord);
  28.     color = texColor;
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement