BCS.gdshader 453 B

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