#if UNITY_REVERSED_Z
depth = input.positonCS.z
- (input.positonCS.z / input.positionScreen.w) * _IntersectionWidth * 20
* InterleavedGradientNoise(input.positonCS.xy, 0)
;
#else
float depthT = 1 - input.positonCS.z;
depthT = depthT
- (depthT / input.positionScreen.w) * _IntersectionWidth * 20
* InterleavedGradientNoise(input.positonCS.xy, 0)
;
depth = 1 - depthT;
#endif
Unity 模仿UE4 节点 PixelDepthOffset
最新推荐文章于 2024-11-16 17:40:05 发布