Shader material with imported mesh

Ok, now I figure out:

worldNormal needs to be normalized.

I added normalization in the vertex shader when initiating the worldNormal varying before passing it to frag shader.

worldNormal = normalize(mat3( worldView[ 0 ].xyz, worldView[ 1 ].xyz, worldView[ 2 ].xyz ) * normal);

3 Likes