VRCCameraSettings - DepthTextureMode doesn't affect avatar cameras
tracked
Mіcca
ScreenCamera.DepthTextureMode and PhotoCamera.DepthTextureMode don't enable depth generation on cameras attached to an avatar.
Instead, avatar cameras use a previous [and invalid] depth buffer rendered by ScreenCamera or PhotoCamera, which leads to off-axis depth effects in shaders rendered with these cameras.
This produces artifacts and broken shader behavior with third party camera systems like VRCLens, etc, in worlds that utilize DepthTextureMode instead of a depth light.
Log In
_
_tau_
tracked
_
_tau_
needs more information
If this is a Camera component on your avatar, can you not enable DepthTextureMode yourself directly on the component in that case? Setting the DepthTextureMode on the photo or screen camera very intentionally only affects those 2 components.
Happyrobot33
_tau_ You cant animate that field on a camera, similar to how you cant animate the masks field on camera components
_
_tau_
Happyrobot33: Ah, right. I misremembered and though you could set it from the Debug inspector.
This is a tricky one still, as this effectively is a feature request for allowing you to set DepthTextureMode on avatar cameras. The existing Udon APIs for ScreenCamera and PhotoCamera really shouldn't affect this IMO.
A dedicated component could be introduced, but as a feature request I don't expect this to be high priority at the moment. Setting it back to Tracked to represent this either way.
Happyrobot33
_tau_ i think the bigger issue here even if the feature doesnt want to be added is the invalid depth texture behaviour, it seems like any cameras without the depth texture mode still broadcast the stale depth texture to shaders anyway
_
_tau_
Happyrobot33: Well, yes, but that's how Unity works. I don't think "fixing" engine behaviour is something VRChat specifically should handle here. I see the point, however.
StormRel
tracked