im trying to make blood screen have a distort effect based on a normal map.
it works but as u can see in the code
the uvs are only shifted to the left.
how to distort based on the normal map?
uniform sampler2D basecolor : hint_default_black;
uniform vec4 coloroverlay : source_color;
uniform sampler2D normalmap : hint_normal;
uniform float alphablend : hint_range(0.0, 1.0, 0.01) = 1.0;
uniform float strenght : hint_range(0.0, 1, 0.01) = 0.05;
void fragment() {
vec2 distortUV = (texture(normalmap, SCREEN_UV).xy * strenght) * strenght * 0.5;
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE).xy + distortUV;// + shifts to the left?
vec3 col = texture(SCREEN_TEXTURE,uv).xyz * coloroverlay.xyz ;
vec4 albedo_tex = texture(basecolor,uv);
COLOR = vec4(col,alphablend * albedo_tex.a);
}