Transmission color artefacts with shader material

Godot Version

Godot 4.3.2

Question

I followed this tutorial ( https://www.youtube.com/watch?v=auFZe7ab8AE) to create swaying trees for Godot 3. To make it swaying I use a shader material. If I chance the transmission color I get artefacts on the texture. some parts are colors, but other parts are on the original colour.

How can I chance the shader script so I don’t get this artefacts?

shader_type spatial;
render_mode depth_draw_alpha_prepass, cull_disabled, world_vertex_coords;
uniform sampler2D texture_albedo : hint_albedo;
uniform sampler2D normal_albedo : hint_albedo;
uniform vec4 transmission : hint_color;
uniform float sway_speed = 1.0;
uniform float sway_strength = 0.05;
uniform float sway_phase_len = 8.0;
void vertex() {
float strength = COLOR.r * sway_strength;
VERTEX.x += sin(VERTEX.x * sway_phase_len * 1.123 + TIME * sway_speed) * strength;
VERTEX.y += sin(VERTEX.y * sway_phase_len + TIME * sway_speed * 1.12412) * strength;
VERTEX.z += sin(VERTEX.z * sway_phase_len * 0.9123 + TIME * sway_speed * 1.3123) * strength;
}
void fragment() {
vec4 albedo_tex = texture(texture_albedo, UV);
vec4 normal_tex = texture(texture_albedo, UV);
ALBEDO = albedo_tex.rgb;
ALPHA = albedo_tex.a;
METALLIC = 0.0;
ROUGHNESS = 1.0;
NORMALMAP = normal_tex.rgb;
TRANSMISSION = transmission.rgb;
}

try changing TRANSMISSION to SSS_TRANSMITTANCE_COLOR

that built-in changed between 3.0 and 4.0 and I think that tutorial is from 3.0. I remember following that exact same tutorial though! Helpful.

BTW there’s another one maybe worth a look: IRRADIANCE , not sure if you could use that like transmission (or why you would, since actual transmission support is actually in there), but maybe it’d help somehow.

spatial shader fragment built ins