Advertisement
Mudbill

Basic OpenGL Fragment Shader

Sep 17th, 2017
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #version 330 core
  2.  
  3. /* Input from vertex shader */
  4. in vec2 vtxCoord;
  5.  
  6. /* Output to OpenGL */
  7. out vec4 FragColor;
  8.  
  9. uniform sampler2D textureSampler0;
  10.  
  11. void main()
  12. {
  13.     FragColor = texture(textureSampler0, vtxCoord);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement