spacecloud
that works,
works fine for my grass, but when appling it to my tree branches, it doesnt . i think it has to do with the pivot being to far away
shader_type spatial;
render_mode blend_mix, depth_prepass_alpha, cull_disabled, diffuse_burley, specular_schlick_ggx;
uniform float alphatreshold;
uniform float strenght : hint_range(0.0, 1.0, 0.05);
uniform float speed : hint_range(0.0, 1.0, 0.1);
uniform sampler2D colortex : source_color,filter_linear_mipmap,repeat_disable;
uniform sampler2D normaltex : hint_roughness_normal,filter_linear_mipmap,repeat_disable;
uniform sampler2D roughnesstex : hint_roughness_gray,filter_linear_mipmap,repeat_disable;
void vertex() {
VERTEX.x += sin(TIME * speed + VERTEX.x + VERTEX.z ) * strenght * COLOR.g;
VERTEX.y += sin(TIME * speed + VERTEX.y + VERTEX.x ) * strenght * COLOR.g;
VERTEX.z += sin(TIME * speed + VERTEX.z + VERTEX.y ) * strenght * COLOR.g;
}
void fragment() {
// Place fragment code here.
ALPHA = texture(colortex,UV).a;
ALPHA_SCISSOR_THRESHOLD = alphatreshold;
ALBEDO= texture(colortex,UV).rgb;
NORMAL_MAP = texture(normaltex,UV).rgb;
SPECULAR = 0.5;
ROUGHNESS = texture(roughnesstex,UV).r;
}