Render Custom Depth on Nanite enabled not working

Hello guys,

What is the current status?

As I understand, the 5.1 docs says it is not (yet) supported

Nanite-enabled meshes do not currently support:

  • Custom depth or stencil

If so, why these tickets says it’s fixed/resolved?

possibly related issue (however this one does not mention ‘Nanite’):

I would really have a great usage of writing to stencil buffers globally for entire CitySample demo full of nanite meshes. Copying mesh (and making it no-nanite), using Nanite Pass Switch seems to be a workaround applicable manually only to some small portion of selected actors, but it seems it is not a good way to go globally with a huge scene like that. My usecase is creating a segmentation masks, where I can controll segmentation classes by simple regexes (classes like: pedestrain, car, building, road, sky, traffic_sign etc.).

Any chance we get this feature implemented in 5.2? Or maybe to get more insights of what needs to be done to make Nanite working with stencils buffer writing. Maybe it is quite easy or moderate difficulty task - so it can be pushed by the community?

2 Likes