console_no_bg.fs 353 B

1234567891011121314151617
  1. #version 330 core
  2. out vec4 FragColor;
  3. in vec3 ourColor;
  4. in vec2 TexCoord;
  5. in vec3 ourBackground;
  6. // texture sampler
  7. uniform sampler2D texture1;
  8. void main()
  9. {
  10. vec4 original = texture(texture1, TexCoord);
  11. if (original.r < 0.1f || original.g < 0.1f || original.b < 0.1f) discard;
  12. vec4 fg = original * vec4(ourColor, 1.f);
  13. FragColor = fg;
  14. }