add initial project files and configurations, including EventBus, systems, and resources
This commit is contained in:
20
Shaders/TunnelVision.gdshader
Normal file
20
Shaders/TunnelVision.gdshader
Normal file
@@ -0,0 +1,20 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float vignette_intensity : hint_range(0.0, 1.0) = 0.0;
|
||||
uniform vec4 vignette_color : source_color = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
void fragment() {
|
||||
vec2 center = vec2(0.5, 0.5);
|
||||
|
||||
float dist = distance(UV, center);
|
||||
|
||||
float radius = 0.8 - (vignette_intensity * 0.7);
|
||||
|
||||
float softness = 0.2;
|
||||
|
||||
float vignette = smoothstep(radius, radius - softness, dist);
|
||||
|
||||
float alpha = 1.0 - vignette;
|
||||
|
||||
COLOR = vec4(vignette_color.rgb, alpha * vignette_intensity * 1.5);
|
||||
}
|
||||
Reference in New Issue
Block a user