Advertisement
Zunesha

Shader de aplicar tonalidade ( Sepia, black&white) Godot 4

Dec 23rd, 2023
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Shader de aplicar tonalidade ( Sepia, black&white) Godot 4
  2.  
  3. shader_type canvas_item;
  4.  
  5. uniform vec4 base : source_color;
  6. uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
  7.  
  8. void fragment() {
  9.     vec3 c = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0).rgb;
  10.     float v = dot(c, vec3(0.33333, 0.33333, 0.33333));
  11.     v = sqrt(v);
  12.     COLOR.rgb = base.rgb * v;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement