In v9.3.2, rendering glitches occur when using Selection Outline on meshes with frozen sub-materials under fast snapshot rendering

This did not occur in v9.3.1.

Please refer to the repro for details, but I apologize if this is due to my incorrect usage.

repro: https://playground.babylonjs.com/#VGJ1BQ#1

For your reference, I am also attaching a record of the repro in the actual env:

Thank you for maintaining this great framework!
My work simply wouldn’t be possible without Babylon :smiling_face_with_three_hearts:

It might be helpful if the playground allowed for more specific version selection.

I’m sorry, I had listed the wrong version number where the issue occurs, and I’ve corrected it.

Thanks for the great repro!

This is a regression introduced in 9.3.2 by an internal change in how DepthRenderer.isReady interacts with scene.isReady(). SelectionOutlineLayer uses the depth renderer under the hood, and it ended up stamping the depth shader onto the main pass’s draw wrapper. With frozen materials, the cached “ready” state then prevented StandardMaterial.isReadyForSubMesh from restoring the correct effect, so the mesh got rendered with the depth shader (i.e. fully black).

Fix is up: Fix DepthRenderer.isReady corrupting current pass draw wrapper by Popov72 · Pull Request #18356 · BabylonJS/Babylon.js · GitHub. Nothing wrong with your code — your usage is correct.

Thank you for the quick fix and explanation!
I’m looking forward to the release!