crest icon indicating copy to clipboard operation
crest copied to clipboard

Underwater rendering delayed with whirlpools

Open Revmatek opened this issue 1 year ago • 1 comments

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

  1. Open the whirlpool scene
  2. Enable underwater rendering on the camera
  3. 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

Revmatek avatar May 29 '24 10:05 Revmatek

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.

magenta404 avatar Jun 29 '24 18:06 magenta404