How to remove the blue plane when using maxZ of the camera?

Hi, everyone.

I’m working on implementing UI changes based on distance.
Fortunately, I found a way to hide using maxZ on the forum.

However, blue planes keep appearing. How do I get rid of them?

My P.G
UI - show/hide/position | Babylon.js Playground (

Btw, Is there a way to keep UI Rect floating on top of the box all the time without being affected by the camera? Now, if the camera approaches, it goes into the box.

It’s the clear color. Basically, nothing is rendered beyond that distance.
You can change it that way:

Thank you reply :slight_smile:
I understand. It wasn’t the way I wanted it to be.

But all the same, I implemented.

However, what I am worried about is that thousands of ADTs and planes will be created in the future, so this method does not seem to be a good idea. Is there a better way?

what is an ADT?

It’s AdvancedDynamicTexture.

I think there is 1 drawcall per plane. so thousand of planes will be a bottleneck. Maybe rendering texts in a single ADT and then rendering them all at once using particles or mesh+custom shader?

1 Like

Sorry, I don’t understand. :sob:

What do you mean by using particles or mesh+custom shader?
Also, Does single ADT mean made using CreateForFullscreenUI method?

CreateForFullscreenUI creates one adt
try to create a PG that shows your potential problem.


Yes, thank you. I’ll give it a try.

1 Like