[SelectionOutlineLayer]: isLayerReady check would always return false

Hey @Evgeni_Popov , I noticed that you modified the isLayerReady check in SelectionOutlineLayer.
After some tests, I found that the isLayerReady would always return false when it’s executed by then scene whenReadyAsync caused by the depthRenderer.getDepthMap().isReadyForRendering() would be false when being checked.

I know why, this._depthMap.customIsReadyFunction in DepthRenderer would check every subMesh material.enableDepthWrite, if it exits a material which disables the depth write, it seems never ready. I wanna ask why selectionOutlineLayer should ensure every material should enable depth write even it’s not used in its renderList? Is that a reasonable check?

Or maybe I should custom set renderList in depthMap RTT ?

Can the SelectionOutlineLayer maintain itself depthRenderer and the depthMap renderList linked its selection list ? Any advice?

There was a bug in the depth renderer, this PR will fix it:

2 Likes