BCS.shader 375 B

12345678910111213141516
  1. shader_type canvas_item;
  2. uniform float brightness = 0.8;
  3. uniform float contrast = 1.5;
  4. uniform float saturation = 1.8;
  5. void fragment() {
  6. vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb;
  7. c.rgb = mix(vec3(0.0), c.rgb, brightness);
  8. c.rgb = mix(vec3(0.5), c.rgb, contrast);
  9. c.rgb = mix(vec3(dot(vec3(1.0), c.rgb) * 0.33333), c.rgb, saturation);
  10. COLOR.rgb = c;
  11. }