mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-04 15:00:09 +01:00
15 lines
282 B
GLSL
15 lines
282 B
GLSL
shader_type canvas_item;
|
|
|
|
uniform vec4 base : hint_color;
|
|
|
|
void fragment() {
|
|
vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb;
|
|
|
|
//float v = max(c.r, max(c.g, c.b));
|
|
float v = dot(c, vec3(0.33333, 0.33333, 0.33333));
|
|
v = sqrt(v);
|
|
//v *= v;
|
|
COLOR.rgb = base.rgb * v;
|
|
|
|
}
|