Post Game jam commit
This commit is contained in:
commit
6db2131520
164 changed files with 172524 additions and 0 deletions
13
shaders/fade_in.gdshader
Normal file
13
shaders/fade_in.gdshader
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
shader_type canvas_item;
|
||||
uniform sampler2D mask; // a texture
|
||||
uniform float progress : hint_range(0.0, 1.0, 0.001);
|
||||
|
||||
void fragment() {
|
||||
float mask_value = texture(mask, UV).r;
|
||||
|
||||
// ensure the progress is a bit bigger than the feather
|
||||
float threshold = progress * 1.001;
|
||||
|
||||
// Fade alpha based on mask vs. threshold with a feather
|
||||
COLOR.a *= smoothstep(threshold, threshold * 0.999, mask_value);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue