0

depth blend with depthnormals not supported

Dennis V H 7 years ago updated 7 years ago 1

When using the new Post Processing effect stack from Unity, it always renders at least the DepthNormals instead of Depth texture. When using the depth blend node, it only uses the _CameraDepthTexture which is empty, thus not rendering any soft clipping inside my shader. 

Workaround for this issue is using the latest Post Processing stack version (which leaves user set flags intact) and change the "Set" method in the with shader forge included EnableCameraDepthInForward.cs to: 


DepthTextureMode dtm = GetComponent<Camera>().depthTextureMode;

        if ((dtm & DepthTextureMode.Depth) != DepthTextureMode.Depth)
GetComponent<Camera>().depthTextureMode = dtm | DepthTextureMode.Depth;


This sets the plain basic unencoded depthTexture to be rendered as well.