- 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>
20 lines
763 B
Plaintext
20 lines
763 B
Plaintext
shader_type fog;
|
|
|
|
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((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;
|
|
}
|