-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
The reflection of Reflector is stretched when the camera has view offset #30587
Comments
The reflector uses a technique called "projective texture mapping" and not every camera modification is compatible to that. We have a similar issue in #28954 (comment). This is a more fundamental limitation and only fixable with a partial rewrite. Unfortunately, you can't use the same workaround like #28954 since the node version of |
So if I use the |
|
I see, let me have a look if I can solve the opposite offset problem in |
Description
I am using the Reflector to render the reflection on a mesh. When the camera isn't set with the view offset, everything's ok. But when the camera is set with a quite large view offset, as the object being reflected is on the edge of the view, the reflection is stretched.
Reproduction steps
Code
please see the codes in the live example
Live example
the following example uses the original reflector, you can see the strech when the offset x is set around 500
I think the problem is related to the view offset of the reflector camera. I comment the
in the source code of Reflector.js. Then the stretch is disappeared in some cases. When the camera is dollyed in , it appeared again. I don't know if this is helpful.
Screenshots
the original reflector

my reflector, solves the stretch only in some certain cases, as below


when the camera is dollyed in , it appeared again, even without the view offset.
Version
r172
Device
No response
Browser
No response
OS
No response
another guy also notices the same problem, link is here: Using Camera.setViewOffset with Reflector stretches the reflected texture in three.js
The text was updated successfully, but these errors were encountered: