You can enable the depth texture by using the depthTextureMode property of the camera. Once enabled, the depth texture can be accessed in the Shader through the camera_DepthTexture
property.
Common uses of depth textures include:
Note: Depth textures only render non-transparent objects. Transparent objects will not write to the depth texture.
You can enable the opaque texture by using the opaqueTextureEnabled property of the camera. Once enabled, Shaders in the transparent queue can use the camera_OpaqueTexture
property.
Additionally, you can set the downsampling level through the opaqueTextureDownsampling property of the camera to balance clarity and performance.