You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lighting does not change on the model when it is rotated. I corrected this by adding the following at the bottom on your default.vert shader replacing "normal = updatedNormal;" Seems to work nicely now. Great work, this really helped me get my code working. Cheers.
mat3 normalMatrix = transpose(inverse(mat3(M)));
normal = normalize(normalMatrix * updatedNormal);
The text was updated successfully, but these errors were encountered:
Lighting does not change on the model when it is rotated. I corrected this by adding the following at the bottom on your default.vert shader replacing "normal = updatedNormal;" Seems to work nicely now. Great work, this really helped me get my code working. Cheers.
mat3 normalMatrix = transpose(inverse(mat3(M)));
normal = normalize(normalMatrix * updatedNormal);
The text was updated successfully, but these errors were encountered: