sepia.gdshader 310 B

123456789101112
  1. shader_type canvas_item;
  2. uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
  3. uniform vec4 base : source_color;
  4. void fragment() {
  5. vec3 c = textureLod(screen_texture, SCREEN_UV, 0.0).rgb;
  6. float v = dot(c, vec3(0.33333, 0.33333, 0.33333));
  7. v = sqrt(v);
  8. COLOR.rgb = base.rgb * v;
  9. }