VRC Camera emits inaccurate Depth Texture
あっぷるてぃー
This problem occurs when the VRC Camera is launched in an environment where a depth texture has not been issued.
In order to use a depth texture in a shader, it must be forcibly issued by a directional light.
For this reason, depending on the world, the depth texture may not be issued.
To maintain the appearance of the shader's rendering, the display should be switched between the presence and absence of a depth texture, but the depth texture issued by the VRC Camera gets in the way.
The VRC Camera calls the depth texture required for certain effects, and it is called even in worlds where a depth texture has not been issued.
Plus, the biggest problem is that it shows the depth data from the VRC Camera.
A shader that issues a depth texture issued by the VRC Camera will produce unintended rendering results, which can sometimes be unpleasant.
Therefore, it is either necessary to prevent the shader from receiving the depth texture issued by the VRC Camera, or to provide another depth texture that the shader can use.
Log In
_
_tau_
As far as I understand, this issue can only occur if a world creator uses a shader that requires a depth texture, but fails to set up a depth light to enable depth rendering in the main camera. As such, I believe it is fair to classify this as an issue on the world creators' side.
There is the option to clear the depth texture after the VRChat camera finishes rendering, but this is not easily accomplished and would require potentially extensive modification to the camera rendering pipeline. Given the observed rarity of the issue, this is not something we are prepared to do at the moment I'm afraid.
あっぷるてぃー
Problems with shaders in a world are the result of lack of consideration on the part of the world creator, but it's a different story for avatars that use shaders that require a depth texture.
Avatar shaders are affected by the world settings, so they behave differently in worlds where a depth texture has been issued and worlds where it has not.
In such cases, the shader must at least determine whether a depth texture is present and switch its display, but the fact that this is hindered by the inaccurate depth texture issued by the VRC camera is a major problem for shader developers.
Therefore, this problem would be improved if there was at least a way to accurately determine whether a depth texture has been issued.