79231695

Date: 2024-11-27 19:52:01
Score: 0.5
Natty:
Report link

Turns out Unity has changed how global textures are handled with the new version. Please refer to this answer I've got from the Unity staff.

In the end I found a much simpler solution than writing my own rendering feature. I found out that the camera depth texture is available in the OnRenderObject call. So I'm just fetching it there and doing my logic etc. in Update. Just make sure to add a null check before you start rendering.

Previously in 2021 and prior I also had to wait 1 frame until the depth texture was generated but this was still possible using only the Update loop.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Buttermilch