Skip to content

Instantly share code, notes, and snippets.

@jimmyjonezz
Created May 4, 2020 15:33
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/693aa769b247c4ba5dfe2667e8d52eba to your computer and use it in GitHub Desktop.
Save jimmyjonezz/693aa769b247c4ba5dfe2667e8d52eba to your computer and use it in GitHub Desktop.
shader_type canvas_item;
uniform float brightness = 0.5;
void fragment(){
vec4 pixel_color = texture(SCREEN_TEXTURE, SCREEN_UV, 1);
COLOR.rgb = vec3(dot(pixel_color.rgb, vec3(brightness, brightness, brightness)));
}
@jimmyjonezz
Copy link
Author

shader_type canvas_item;
render_mode unshaded;

void fragment() {
vec4 color = texture(SCREEN_TEXTURE, SCREEN_UV);
COLOR.rgb = vec3(dot(color.rgb, vec3(0.25, 0.25, 0.25)));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment