Advertisement
RoshHoul

Untitled

Apr 5th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. shader.frag
  2.  
  3. #version 330 core
  4. in vec2 TexCoord;
  5.  
  6. out vec4 color;
  7. out vec4 tableCol;
  8.  
  9. uniform sampler2D texture0;
  10.  
  11. void main()
  12. {
  13. color = texture(texture0,TexCoord);
  14.  
  15. }
  16.  
  17. shader.vs
  18.  
  19. #version 330 core
  20. layout (location = 0) in vec3 position;
  21. layout (location = 2) in vec2 texCoord;
  22.  
  23. out vec2 TexCoord;
  24.  
  25. uniform mat4 model;
  26. uniform mat4 view;
  27. uniform mat4 projection;
  28.  
  29. void main()
  30. {
  31. gl_Position = projection * view * model * vec4(position, 1.0f);
  32. TexCoord = texCoord;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement