Any way to render a mesh, even if it's outside the camera's clipping area?

Godot Version

4.4.1

Question

In my scene is a quad with a shader on it. This quad is meant to draw an effect over the viewport, and so it has a vertex function that repositions the vertices of the quad to be just in front of the camera. Unfortunately, this means that my viewport overlay keeps vanishing whenever the MeshInstance3D object the shader is attached to moves outside of the clipping area of the camera (or editor viewport).

Is there some way to turn this clipping off so that this quad is always drawn regardless of where the viewport clipping shape is? A web search is returning something about VisibilityNotifier, but that seems to have been removed after Godot 3.

There is a OnScreenVisibleNotifier, but you may be better off attaching your quad in front of the camera as a child or setting a truly absurd custom AABB to prevent culling.

1 Like

To disable culling you can set a big value to GeometryInstance3D.custom_aabb or enable RenderingServer.instance_set_ignore_culling()

1 Like