|
|
|
|
|
|
float maxDistance = _ShapeParams[profileID].a; |
|
|
|
|
|
|
|
// Reconstruct the view-space position corresponding to the central sample. |
|
|
|
float2 centerPosSS = posInput.positionNDC; |
|
|
|
float2 cornerPosSS = centerPosSS + 0.5 * _ScreenSize.zw; |
|
|
|
float3 centerPosVS = ComputeViewSpacePosition(centerPosSS, centerDepth, UNITY_MATRIX_I_P); |
|
|
|
float3 cornerPosVS = ComputeViewSpacePosition(cornerPosSS, centerDepth, UNITY_MATRIX_I_P); |
|
|
|
float2 centerPosNDC = posInput.positionNDC; |
|
|
|
float2 cornerPosNDC = centerPosNDC + 0.5 * _ScreenSize.zw; |
|
|
|
float3 centerPosVS = ComputeViewSpacePosition(centerPosNDC, centerDepth, UNITY_MATRIX_I_P); |
|
|
|
float3 cornerPosVS = ComputeViewSpacePosition(cornerPosNDC, centerDepth, UNITY_MATRIX_I_P); |
|
|
|
|
|
|
|
// Rescaling the filter is equivalent to inversely scaling the world. |
|
|
|
float mmPerUnit = MILLIMETERS_PER_METER * (_WorldScales[profileID].x / distScale); |
|
|
|