wave-harmonic / crest

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

Blue and black flashes and static blue patterns appearing in editor #985

Open TheMask3 opened 2 years ago

TheMask3 commented 2 years ago

Describe the bug Blue flashes appearing in both Scene view and Game view when camera is above the water surface. Depending on the settings, black flashes can also appear. When Crest Underwater Renderer is added to the camera and camera is below the water surface, screen areas covered by underwater effect will be covered by mostly static blue patterns with occasional flashes.

Screenshots / video Snipaste_2022-02-02_12-22-51 Snipaste_2022-02-02_12-34-08 Snipaste_2022-02-02_11-53-23 Snipaste_2022-02-02_11-54-21

Log No relevant logs found.

Versions Built-in forward render pipeline in Unity 2021.2.8f1, no occurences in Unity 2020.3.21f1 so far.

To Reproduce Open any scene or create an empty scene, add a new GameObject, add Crest Ocean Renderer component. Done.

Platform Windows 21H1, visible in scene view and game view, untested in release builds yet.

Hardware CPU: i7-10750H 2.60 GHz GPU: RTX 3060 Laptop Memory: 16G

Additional context Decreasing the LOD count makes black flashes appear and move closer towards the camera. Increasing the Min Scale makes blue flashes move further from the camera. This happens when moving mouse cursor between Scene/Game view and editor GUI, possibly related to editor repaint GUI event.

daleeidd commented 2 years ago

Thank you for reporting. Perplexing issue.

Built-in forward render pipeline in Unity 2021.2.8f1

I tried to reproduce in 2021.2.13f1 but couldn't. Are you able to upgrade and see?

Depending on the settings, black flashes can also appear. Decreasing the LOD count makes black flashes appear and move closer towards the camera.

Which settings? They may give a clue. Are they the ones mentioned above?

This happens when moving mouse cursor between Scene/Game view and editor GUI, possibly related to editor repaint GUI event.

What do you have open in the inspector? Maybe a material preview?

Do you have an third party assets running? Is this reproducible with our project? What platform are you setup for targeting? Which graphics API is enabled?

It might be a texture format issue. I made some fixes recently. Are you able to download latest from master and see if fixed?

TheMask3 commented 2 years ago

Thanks for your reply. As of when I did the previous test:

Which settings? They may give a clue. Are they the ones mentioned above?

Just LOD count if you're talking about black flashes.

What do you have open in the inspector? Maybe a material preview?

I don't think it's related to inspector, it could be just any editor stuff, and current selection doesn't affect how those flashes look in any way.

Do you have an third party assets running? Is this reproducible with our project?

Tested newest Github project, no glitches found so far. Neither in Unity 2021.2.8f1 nor Unity 2021.2.13f1.

What platform are you setup for targeting? Which graphics API is enabled?

Windows, Auto API.

Then I upgraded my project to Unity 2021.2.13f1 - which stayed untouched for a month - deleted Crest and copied the newest version to this project, and did the same thing again, then something even weirder happened:

Snipaste_2022-02-26_19-49-25

This time the green patterns are always rendered every frame. I don't know what's the cause for this. As you pointed out, this could be caused by third party assets but since I already imported so many of them, I would not bother spend days just to figure out which asset caused this. I finally solved the problem by switching current Graphics API for Windows from DirectX 11 to DirectX 12. Maybe not a complete fix but it works.

daleeidd commented 2 years ago

Thanks. I am glad you found a workaround.

fatboxSoftware commented 2 years ago

I am experiencing the same exact issue with the green lines covering everything. Unity 2021.3.2f1 and URP12.1.6. Platform is Android using OpenGLES3.

daleeidd commented 2 years ago

I am experiencing the same exact issue with the green lines covering everything. Unity 2021.3.2f1 and URP12.1.6. Platform is Android using OpenGLES3.

OpenGL/WebGL is not supported. You'll have to use Vulkan.