[ad_1]
This can be a additional query from my final, initially I used to be attempting to alter the way in which the depth map is rendered per-pixel. Nonetheless, via extra testing, I’ve discovered that really it has nothing to do with the shader, It is to do with the depth buffer. It is fully damaged.
Listed here are a few issues which can be damaged that somebody might be able to assist with:
SSAO would not work, in addition to any publish processing impact that makes use of the depth texture
You could discover that DOF works, which is true, but it surely blurs the entire picture as if it has no depth. Together with blurring sure objects which can be positioned far-off despite the fact that the main target distance is 0.1.
Additionally, when checking the depth map via the body debugger, I seen some unusual issues:
Initially its all white (it was once gray till I modified a setting which I forgot)
After which, much more unusual, the depth texture seems to be 16x16px. I’ve no clue why, should not it’s 1920×1080?
Even the built-in Unity shaders do not appear to impact the depth masks. I’ve tried a number of completely different customized wrote shaders. Together with ones that write to the Z-Buffer themselves however nothing has labored. One thing tells me it is to do with the undertaking utilizing a 2D Renderer. However I do not know. If anybody will help that will be appreciated, I’ve been caught on this for weeks.
I’ve additionally tried enabling the depth texture within the URP Asset:
[ad_2]