Screen Rect Line Blinking When Rotating

I used ShaderMaterial to draw rectangular boxes on a 2D screen
I hope that moving/rotating the camera does not affect the display of the rectangular box

The following is a PG, and you can see that by default, there is no green rectangular box displayed

When rotating or scrolling the camera, you can see a rectangular box

In my understanding, rect should always be displayed and should not be affected by Frustum Culling

Screen Rect Line Blinking When Rotating | Babylon.js Playground (babylonjs.com)

The mesh position will not be rendered if it is not within the frustum range, and you will need to update the mesh position in real time, or simply add a rectangular box in post-processing.

Can Frustum Culling be avoided? It is completely independent and has nothing to do with the camera
What I’m puzzled about is why it appears after rotating at a certain angle
How to update the grid in real-time, in fact, I have updated its position every frame
How should post-processing be operated?

Just tried it and using alwaysSelectAsActiveMesh can make the mesh avoid frustum culling.
Screen Rect Line Blinking When Rotating | Babylon.js Playground (babylonjs.com)

1 Like

It’s exactly what I need, thank you very much!