feat(particles): bubble trail behind dolphin + block break burst

- 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>
This commit is contained in:
Floppyrj45
2026-04-19 18:09:21 +02:00
parent cafdb7d27e
commit a8341355e3
12 changed files with 318 additions and 58 deletions

View File

@@ -1,21 +1,19 @@
shader_type fog;
uniform float surface_y : hint_range(-100.0, 100.0) = 0.0;
uniform float abyss_depth : hint_range(-200.0, 0.0) = -60.0;
uniform vec3 shallow_color : source_color = vec3(0.25, 0.55, 0.70);
uniform vec3 deep_color : source_color = vec3(0.02, 0.05, 0.10);
uniform float surface_y : hint_range(0, 100) = 60.0;
uniform float abyss_y : hint_range(-100, 0) = -60.0;
uniform float base_density : hint_range(0, 1) = 0.04;
uniform float abyss_density : hint_range(0, 3) = 0.25;
void fog() {
float depth_factor = clamp((WORLD_POSITION.y - abyss_depth) / (surface_y - abyss_depth), 0.0, 1.0);
vec3 surface_color = vec3(0.15, 0.45, 0.6);
vec3 abyss_color = vec3(0.02, 0.08, 0.15);
vec3 fog_color = mix(abyss_color, surface_color, depth_factor);
float current_wave = sin(TIME * 0.3 + WORLD_POSITION.x * 0.05) * 0.02
+ sin(TIME * 0.17 + WORLD_POSITION.z * 0.04) * 0.01;
float base_density = mix(0.3, 0.05, depth_factor) + current_wave;
base_density = clamp(base_density, 0.0, 0.4);
ALBEDO = fog_color;
DENSITY = base_density;
float depth_factor = clamp((surface_y - WORLD_POSITION.y) / (surface_y - abyss_y), 0.0, 1.0);
vec3 col = mix(shallow_color, deep_color, depth_factor);
float density = mix(base_density, abyss_density, depth_factor);
// Subtle current movement
float wave = sin(WORLD_POSITION.x * 0.1 + TIME * 0.3) * 0.5 + 0.5;
density *= (0.9 + wave * 0.2);
ALBEDO = col;
DENSITY = density;
}