uniform float nearClip; // name "Near Clip" min 0 max 100.0 default 1.0
uniform float farClip; // name "Far Clip" min 0.001 max 500.0 default 20.0
void custom_depth(inout FragmentState s) {
float d = nearClip - (s.vertexEyeDistance / farClip);
s.albedo = vec4(d, d, d, 1);
}
#undef Albedo
Replies
Could it be that the gradient gets gamma corrected ?
Also our lead dev here said the gradient of the zdepth in Unity is not linear and gives more precision for closer objects.
I'm not sure how it is correct for compositing software.
And yes it shoud be the lens blur filter.