-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node: NormalMatrix issues #17360
Comments
What do you think about this other pattern? result = inverseTransformDirection( transformedNormal, viewMatrix ).xyz; |
It is to obtain the |
That is correct. See Transforming Normal Vectors with the Inverse Transformation here. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This pattern, which appears in
NormalNode
andNodeBuilder
, is not correct:...unless you assume the model matrix is uniformly-scaled. I don't think we can assume it is.
To fix this, see this article. The relevant three.js method is
Matrix3.getNormalMatrix( matrix )
.This pattern, on the other hand,
is assumed to be OK because we assume the
viewMatrix
is not scaled at all./ping @sunag
The text was updated successfully, but these errors were encountered: