19 line
392 B

  1. #version 330
  2. // Input vertex attributes (from vertex shader)
  3. in vec2 fragTexCoord;
  4. in vec4 fragColor;
  5. // Input uniform values
  6. uniform sampler2D texture0;
  7. uniform vec4 colDiffuse;
  8. // Output fragment color
  9. out vec4 finalColor;
  10. void main()
  11. {
  12. vec4 texelColor = texture(texture0, fragTexCoord);
  13. if (texelColor.a == 0.0) discard;
  14. finalColor = texelColor * fragColor * colDiffuse;
  15. }