lose screen animation
This commit is contained in:
parent
1d0032b587
commit
dba09165e8
9 changed files with 151 additions and 2 deletions
15
levels/greyscale.gdshader
Normal file
15
levels/greyscale.gdshader
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
uniform float effect_amount: hint_range(0, 1) = 0.0;
|
||||
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
|
||||
|
||||
void fragment() {
|
||||
vec4 c = texture(screen_texture, SCREEN_UV);
|
||||
float y = 0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b;
|
||||
COLOR.rgb = mix(c.rgb, vec3(y), effect_amount);
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// // Called for every pixel for every light affecting the CanvasItem.
|
||||
// // Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
Loading…
Add table
Add a link
Reference in a new issue