2
0

BasicMesh.frag 672 B

12345678910111213141516171819202122232425
  1. // ----------------------------------------------------------------
  2. // From Game Programming in C++ by Sanjay Madhav
  3. // Copyright (C) 2017 Sanjay Madhav. All rights reserved.
  4. //
  5. // Released under the BSD License
  6. // See LICENSE in root directory for full details.
  7. // ----------------------------------------------------------------
  8. // Request GLSL 3.3
  9. #version 330
  10. // Tex coord input from vertex shader
  11. in vec2 fragTexCoord;
  12. // This corresponds to the output color to the color buffer
  13. out vec4 outColor;
  14. // This is used for the texture sampling
  15. uniform sampler2D uTexture;
  16. void main()
  17. {
  18. // Sample color from texture
  19. outColor = texture(uTexture, fragTexCoord);
  20. }