Skip to content

Instantly share code, notes, and snippets.

@jimmyjonezz
Created May 4, 2020 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmyjonezz/fec26bf9152d161845d676cfce072895 to your computer and use it in GitHub Desktop.
Save jimmyjonezz/fec26bf9152d161845d676cfce072895 to your computer and use it in GitHub Desktop.
shader_type canvas_item;
uniform float brightness=0.8;
uniform float contrast=1.5;
uniform float saturation=1.8;
void fragment() {
vec3 c = textureLod(SCREEN_TEXTURE,SCREEN_UV,0.0).rgb;
c.rgb = mix(vec3(0.0),c.rgb,brightness);
c.rgb = mix(vec3(0.5),c.rgb,contrast);
c.rgb = mix(vec3(dot(vec3(1.0),c.rgb)*0.33333),c.rgb,saturation);
COLOR.rgb=c;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment