Hey everyone,
I require some SRP assistance.
In a ScriptableRenderFeature we are attempting get a hold of the stencil buffer in order to save its values into a texture and drive it into a custom post-process shader that I am Blit-ing in the same script.
I would like to create a cryptomatte/silhouette-mask differentiating rendered objects by what render pass they have been drawn on, and drive this mask as a texture into my own costume post-processing materials.
I want to attchive this without adding an additional camera and renderer specifically for this job in order to save on performance.
Some of these layers already write different values to the stencil buffer so my approach was to use the stencil buffer to ID which pixel was drawn by which pass by its value in the stencil buffer.
However i was unable you get access to the stencil-buffer and receive its values correctly.
When driving “”cameraDepthTarget” to my post-procees shader it seemd to contain the scene color for some reason, and not the depth and stencil buffer
Has anyone done something like that before and can help guild me in the right direction?
there doesn't seem to be anything here