Skip to content

Instantly share code, notes, and snippets.

@cbscribe
Created February 21, 2017 05:20
Show Gist options
  • Save cbscribe/4abfd044b097c8171bba58d63c2425a0 to your computer and use it in GitHub Desktop.
Save cbscribe/4abfd044b097c8171bba58d63c2425a0 to your computer and use it in GitHub Desktop.
Godot greyscale shader
// use on 1x1 white pixel texframe
// shader properties
uniform float brightness = 0.5;
color pixel_color = vec4(texscreen(SCREEN_UV), 1);
COLOR.rgb = vec3(dot(pixel_color.rgb, vec3(brightness, brightness, brightness)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment