Underwater rendering delayed with whirlpools
Is there an existing issue for this?
- [X] I have searched the existing issues.
Have you checked the documentation to resolve your problem?
- [X] I have read the linked documentation and could not resolve my issue.
Current Behavior
If a camera enters the water through the side of a whirlpool, the underwater rendering will not be visible momentarily.
Expected Behavior
The transitions to underwater rendering should be similar to entering the water normally.
Steps To Reproduce
- Open the whirlpool scene
- Enable underwater rendering on the camera
- Move the camera back and forth in the water in the whirlpool underwater.
https://github.com/wave-harmonic/crest/assets/114962753/146029c4-6d16-4548-a1a4-467f81ce7e92
Unity Version
2021.3.26f
Crest Version
4.19
Render Pipeline
Built-In
Editor or Standalone
Editor (Edit Mode), Editor (Play Mode), Standalone
Environment
No response
Anything else?
No response
Thanks. This is because the effect is enabled/disabled based on height, and there is not enough time for the effect to trigger before crossing the threshold (queries have a delay of a few frames).
A workaround is to enable Underwater Renderer > Debug > Disable Height Above Water Optimization. It will always have the underwater effecting running.
For these cases we will have to somehow improve this check.