very starty setup

This commit is contained in:
Kasper Sauramo
2025-07-31 18:26:18 +03:00
parent 77bccbf2ba
commit a9ec3cfa26
4 changed files with 61 additions and 15 deletions

View File

@@ -1,5 +1,7 @@
shader_type canvas_item;
uniform sampler2D trail_tex;
uniform float sensor_distance = 2.0;
uniform float sensor_angle = 15.0;
uniform float rotation_angle = 23.0;
@@ -7,10 +9,11 @@ uniform float move_distance = 2.67;
uniform float decay_factor = 0.75;
void fragment() {
COLOR = vec4(0.05, 0.05, 0.05, 1.0);
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
vec2 uv = UV;
// Read current trail value
vec4 trail = texture(trail_tex, uv);
// Apply decay
trail *= decay_factor;
COLOR = trail;
}