- BubbleTrail.gd: GPUParticles3D, auto-configured in _ready, set_intensity() API - BlockBreakParticles.gd: one_shot burst, emit_burst(pos, color) API - DolphinController.gd: bubble_trail onready + speed_factor hook in _update_movement - Dolphin.tscn: BubbleEmitterPoint (0,0,1.2) > BubbleTrail child added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
826 B
Plaintext
26 lines
826 B
Plaintext
shader_type spatial;
|
|
render_mode unshaded, blend_add, depth_draw_never, cull_disabled;
|
|
|
|
uniform vec3 ray_color : source_color = vec3(0.7, 0.9, 1.0);
|
|
uniform float intensity : hint_range(0, 2) = 0.6;
|
|
uniform float fade_bottom : hint_range(-100, 0) = -30.0;
|
|
|
|
void fragment() {
|
|
vec2 uv = UV;
|
|
float rays = 0.0;
|
|
// Multiple ray stripes
|
|
for (float i = 0.0; i < 5.0; i++) {
|
|
float offset = i * 0.2 + TIME * 0.03;
|
|
float r = smoothstep(0.02, 0.0, abs(fract(uv.x * 8.0 + offset) - 0.5));
|
|
rays += r * (1.0 - i / 5.0);
|
|
}
|
|
// Fade vertical
|
|
float vertical_fade = smoothstep(0.0, 0.4, 1.0 - uv.y);
|
|
// Fade avec profondeur joueur
|
|
float depth_fade = clamp((VERTEX.y - fade_bottom) / (60.0 - fade_bottom), 0.0, 1.0);
|
|
|
|
float final_alpha = rays * vertical_fade * depth_fade * intensity;
|
|
ALBEDO = ray_color;
|
|
ALPHA = final_alpha;
|
|
}
|