very starty setup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user