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:
parent
c397615e12
commit
95665f54eb
2 changed files with 23 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -56,3 +56,22 @@ jump={
|
|||
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[shader_globals]
|
||||
|
||||
wind_direction={
|
||||
"type": "vec3",
|
||||
"value": Vector3(5, 1, 5)
|
||||
}
|
||||
wind_noise_size={
|
||||
"type": "float",
|
||||
"value": 0.1
|
||||
}
|
||||
wind_noise_speed={
|
||||
"type": "float",
|
||||
"value": 0.2
|
||||
}
|
||||
wind_strength={
|
||||
"type": "float",
|
||||
"value": 7.0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue