posterize.glsl 351 B

1234567891011121314151617181920212223242526272829
  1. uniform sampler2D samp9;
  2. out vec4 ocol0;
  3. in vec2 uv0;
  4. void main()
  5. {
  6. float4 c0 = texture(samp9, uv0).rgba;
  7. float red = 0.0;
  8. float green = 0.0;
  9. float blue = 0.0;
  10. if (c0.r > 0.25)
  11. {
  12. red = c0.r;
  13. }
  14. if (c0.g > 0.25)
  15. {
  16. green = c0.g;
  17. }
  18. if (c0.b > 0.25)
  19. {
  20. blue = c0.b;
  21. }
  22. ocol0 = float4(red, green, blue, 1.0);
  23. }