Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- group_uniforms wind;
- uniform sampler2D noise_tex;
- uniform float wind_speed = .1;
- uniform float wind_strength = .01;
- vec3 GLOBAL_VERTEX = (MODEL_MATRIX * vec4(VERTEX, 1.)).xyz;
- float offset = TIME * wind_speed;
- float noise = texture(noise_tex, vec2(GLOBAL_VERTEX.x-offset)).r;
- noise -= .5;
- noise *= wind_strength;
- VERTEX.xy += noise * length(VERTEX.y) * length(VERTEX.xz);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement