rosella
This commit is contained in:
@@ -8,12 +8,12 @@ uniform sampler2D noise_texture ;
|
||||
|
||||
void vertex() {
|
||||
float time = TIME * sway_speed;
|
||||
|
||||
|
||||
// Sample the noise texture using the vertex position
|
||||
vec2 noise_uv = VERTEX.xy * 0.1;
|
||||
float noise_value = texture(noise_texture, noise_uv).r;
|
||||
float randomness = noise_value * randomness_factor;
|
||||
|
||||
|
||||
// Calculate the sway offset
|
||||
float sway_offset = sin(time + VERTEX.y * 0.1) * sway_magnitude + randomness * sway_magnitude;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user