Enabling OIT causes clearColor to be invalid

Enabling OIT causes clearColor to be invalid.
PG:Babylon.js Playground

Hello and welcome aboard!

You have to add at least one mesh to the scene. It solves the issue.

Enabling OIT w/o any meshes doesn’t make sense tho.

Thank you for your reply and hats off to you. In fact, if a Mesh is not visible, this exception will also occur. If I animate a Mesh with a Fade, it’s really messy.I am not a native English speaker and I try to be clear.
PG:https://playground.babylonjs.com/#GEIQ9E#4

visibility expects a number not a boolean.

However you’re right, setting it to 0 kills the clearColor. You can set the value of the visibility to a very low number so the mesh becomes invisible but still recognized by the scene as an existing mesh on the scene.

However enabling OIT w/o any meshes after the scene got ready also seems to fix the issue:

1 Like

That’s great. Thank you very much.It’s my lack of knowledge. haha

1 Like

I didn’t know about this behavior of OIT either. I had to try out a solution to your issue.

We all learn along the way, buddy! + 1 XP for me and for you as well :wink:

1 Like