posterize.glsl 242 B

12345678910111213141516171819
  1. void main()
  2. {
  3. float4 c0 = Sample();
  4. float red = 0.0;
  5. float green = 0.0;
  6. float blue = 0.0;
  7. if (c0.r > 0.25)
  8. red = c0.r;
  9. if (c0.g > 0.25)
  10. green = c0.g;
  11. if (c0.b > 0.25)
  12. blue = c0.b;
  13. SetOutput(float4(red, green, blue, 1.0));
  14. }