wave-harmonic / crest

A class-leading water system implemented in Unity
MIT License
3.39k stars 473 forks source link

Underwater effect flickers black #660

Closed daleeidd closed 3 years ago

daleeidd commented 3 years ago

Describe the bug There have been reports that the screen will flicker black occasionally when the underwater effect is used.

Screenshots / video TBC

Versions Crest 4.5, HDRP 8.2 and Unity 2020.1.2f1

Platform TBC

Hardware TBC

Additional context Something to consider is that bloom can turn the entire screen black when black is a symptom of another issue. An example is before we clamped the falloff parameters to 0.01 as a minimum, the ocean could be rendered black due to an error (for lack of better word) in the power function. Bloom would then make the entire screen black.

There is also the other issue which was mitigated with a fix where the underwater effect colour was too sensitive to ocean height changes. So flying through underwater would cause flashing or strobing. It should be considering unrelated but might be confused with this one.

daleeidd commented 3 years ago

User Mr. Game & Watch from discord:

I've been getting the same black flickering as above, past few Crest HDRP iterations with 2019.3 and 2020.1, currently with Crest HDRP 4.4 and HDRP 8.2.0. Setting Lod Data Resolution as Berserker44 mentioned did not help; it was already at 256. The only thing that works for me is disabling Bloom in Project Settings > HDRP Default Settings. Setting Lod Data Resolution to 384 and then back to 512 somehow worked... Using Min Texels Per Wave = 9, Min Scale = 16, Max Scale = 512, Lod Data Resolution = 512, Geometry Down Sample Factor = 4, Lod Count = 3

Yes, the whole screen flickers black randomly. I just tested and it still happens in the boatdev scene using Crest HDRP 4.5/HDRP 8.2.0/Unity 2020.1.2f1 with Lod Data Resolution set to the default 256. Bumping up this value to 384 seems to stop the flickering.

With Drop Detail Height Based On Waves set to any value greater than zero, I am experiencing a lot of stuttering. I notice it happens as I drive the boat around and with the ClipSurface debug window up, the red rectangle jumps at the same time.

daleeidd commented 3 years ago

Going to close this one as we have fixed quite a possible causes for this. I will reopen if it returns.