Rendering Group ID behavior with screen space vertex shader

Im experimenting with combining the 3D scene with flat, 2D overlay-esque imagery, and have created a basic node material that just bypasses the view matrix in the vertex shader. Ive then put it on a plane, and it just shows up as a flat image on the screen that disapears when the plane is out of the viewport.

I wanted to try and change the rendering group ID, so that I could render this image behind some of the other 3d elements in the scene, but whenever I do so it disapears completely:

What is the reason for it not rendering behind the sphere in the scene while remaining visible, and is there a way to set it up so it does that?

many thanks :baby_chick:

That’s because -1 is not a valid ID by default, you should set BABYLON.RenderingManager.MIN_RENDERINGGROUPS to make the group rendered.

3 Likes

thank you!