Hi, I would like to extract a Depth Texture from certain objects that are inside a layer. The reason is, I want to perform occlusion culling of vegetation but I only want to keep big objects and/or static. I don't want to use the vegetation itself to occlude other objects. (This causes flickering)
The idea is, I have a secondary camera attached to the main one, that only renders objects in a certain culling mask. However, I want it to be more minimal and simplified. I don't need post processing, shadows, or even color on that secondary camera, since I only want Depth.
Is there any way to do it, or even better, do it in the main camera (without a secondary)?