You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
396 B

  1. #version 450 core
  2. #pragma include ./shared.glsl
  3. in FragmentData fragmentData;
  4. layout (location = 0) uniform sampler2D uTexture;
  5. layout (location = 1) uniform vec4 uColor;
  6. out vec4 outColor;
  7. void main() {
  8. float alpha = texture(uTexture, fragmentData.texCoords).r;
  9. if (alpha <= 0.0) {
  10. discard;
  11. }
  12. outColor = fragmentData.color * uColor * vec4(1.0, 1.0, 1.0, alpha);
  13. }