Renderoverlay vs depth map

May I ask what is the rationale for having the Outline Renderer affect the depth map when mesh.renderOverlay=true? I’m reading erroneous depth values in my depth map with renderOverlay turned on.

pg: https://playground.babylonjs.com/#OQTYRG#25

pg is showing for frame graph but the default depth renderer also shows the same. Is there a simple hack so the renderOverlay shows on-screen but not in the depth texture?

prepass is only supported by standard and pbr materials so far.

@Evgeni_Popov any simple way to support this in framegraph ?

Not looking for support in framegraph, user postprocess/custom task can replicate the same effect with no impact on depth. Just trying to understand why renderOverlay was designed that way since the beginning. I vaguely remember it had smthg to do with highlight layer then? But not fully sure…

If that is what it was, then so be it. If a simple hack is available, great! Otherwise, nvm… back-compat is still more impt. I can workaround not using renderOverlay.

This is a bug in the geometry renderer task. Here’s the fix:

Note that outlines/overlays are not rendered with the legacy depth renderer, but bounding boxes are => it’s fixed in my PR

2 Likes

The PG: https://playground.babylonjs.com/#10WJ5S#48 is not showing the bounding box outline in 8.26, both in webGL and webgpu. Compare with 7.54.2. Chked the codes with the PR snapshot pg, also shows the same.

Commenting out scene.enableDepthRenderer(); shows the bounding box, wai?

I don’t see an outline for the bounding box in 7.54.2?

Commenting or uncommenting scene.enableDepthRenderer() in 8.26.0 doesn’t change anything for me, and I see the same thing than in 7.54.2 (Chrome and Firefox).

I rebooted my system, now its all showing wai. Guess its a cache issue. Sorry for the false alarm!

1 Like