-
Notifications
You must be signed in to change notification settings - Fork 94
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
Mirror Fog #14
Comments
The problem is due to the fact that the frustum of the mirrored camera correspond to the water plane. The distance taken into account to compute the fog is the distance between the object and the plane, instead of the distance to the camera. I currently really don't know how to fix this problem ... This problem will be the same on the basic Mirror of three.js. |
A hacky solution is to multiply the scene fog by some factor before rendering water then restoring it before rendering the scene. This fades the objects out as you move deeper into the surface of the water, but does not color the objects correctly as the problem states is the main issue. |
@jbouny what about a vignette shader applied to the generated mirror texture, just acting on left, top and right side of the texture?, with a radius proportionally corresponding to normalized fog near / far distance relative to camera near / far values, and the color of the vignette would be the same of the fog. |
The reflected elements do not have fog applied to them. At least not when using FogExp2, not sure about regular Fog.
The text was updated successfully, but these errors were encountered: