Advertisement
Guest User

shaders

a guest
Jun 27th, 2016
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // vertex
  2. #version 420
  3.  
  4. in vec2 pos;
  5. in vec2 texcoord;
  6.  
  7. out vec2 tex_coord;
  8.  
  9. void main()
  10. {
  11.     gl_Position = vec4(pos, 0.0, 1.0);
  12.     tex_coord = texcoord;
  13. }
  14.  
  15. // fragment
  16. #version 420
  17.  
  18. in vec2 tex_coord;
  19. out vec4 color;
  20.  
  21. uniform sampler2D tex;
  22.  
  23. void main()
  24. {
  25.     color = texture(tex, tex_coord);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement