Makes wind uniforms global

Changes wind-related shader uniforms to be global.

This allows easier access and modification of these
parameters from other shaders or scripts, improving
the wind effect consistency across the scene.
This commit is contained in:
Dan Baker 2025-06-24 09:19:11 +01:00
parent c397615e12
commit 95665f54eb
2 changed files with 23 additions and 4 deletions

View file

@ -9,11 +9,11 @@ uniform float specular_strength: hint_range(0.0, 1.0, 0.01) = 0.4;
uniform float player_displacement_strength: hint_range(0.0, 1.0, 0.01) = 0.4;
uniform float player_displacement_size: hint_range(0.0, 2.0, 0.01) = 1.0;
uniform vec3 wind_direction; // Use a negative y component to give it an extra touch (For displacement effect and noise scroll direction)
uniform float wind_strength: hint_range(0.0, 1.0, 0.01) = 0.3;
global uniform vec3 wind_direction; // Use a negative y component to give it an extra touch (For displacement effect and noise scroll direction)
global uniform float wind_strength;
uniform sampler2D wind_noise; // Periln FBM Noise looks Best
uniform float wind_noise_size: hint_range(0.0, 1.0, 0.001) = 0.05; // high values dont work well
uniform float wind_noise_speed: hint_range(0.0, 1.0, 0.001) = 0.1;
global uniform float wind_noise_size; // high values dont work well
global uniform float wind_noise_speed;
// Instance the Player Position through a GDScript in the _physics_process
instance uniform vec3 player_position;