|
|
@ -36,22 +36,22 @@ void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID) |
|
|
|
|
|
|
|
|
float4 topleft = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, gatherCoord); |
|
|
float4 topleft = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, gatherCoord); |
|
|
|
|
|
|
|
|
NearestZ = max(topleft.x, NearestZ); |
|
|
|
|
|
NearestZ = max(topleft.y, NearestZ); |
|
|
|
|
|
NearestZ = max(topleft.z, NearestZ); |
|
|
|
|
|
NearestZ = max(topleft.w, NearestZ); |
|
|
|
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topleft.x, NearestZ); |
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topleft.y, NearestZ); |
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topleft.z, NearestZ); |
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topleft.w, NearestZ); |
|
|
|
|
|
|
|
|
float2 v11 = float2(renderSizeRcp.x, 0.0); |
|
|
float2 v11 = float2(renderSizeRcp.x, 0.0); |
|
|
float2 topRight = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, (gatherCoord + v11)).yz; |
|
|
float2 topRight = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, (gatherCoord + v11)).yz; |
|
|
|
|
|
|
|
|
NearestZ = max(topRight.x, NearestZ); |
|
|
|
|
|
NearestZ = max(topRight.y, NearestZ); |
|
|
|
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topRight.x, NearestZ); |
|
|
|
|
|
NearestZ = DEPTH_NEAREST(topRight.y, NearestZ); |
|
|
|
|
|
|
|
|
float2 v13 = float2(0.0, renderSizeRcp.y); |
|
|
float2 v13 = float2(0.0, renderSizeRcp.y); |
|
|
float2 bottomLeft = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, (gatherCoord + v13)).xy; |
|
|
float2 bottomLeft = GATHER_RED_TEXTURE2D_X(InputDepth, S_POINT_CLAMP, (gatherCoord + v13)).xy; |
|
|
|
|
|
|
|
|
NearestZ = max(bottomLeft.x, NearestZ); |
|
|
|
|
|
NearestZ = max(bottomLeft.y, NearestZ); |
|
|
|
|
|
|
|
|
NearestZ = DEPTH_NEAREST(bottomLeft.x, NearestZ); |
|
|
|
|
|
NearestZ = DEPTH_NEAREST(bottomLeft.y, NearestZ); |
|
|
|
|
|
|
|
|
//refer to ue/fsr2 PostProcessFFX_FSR2ConvertVelocity.usf, and using nearest depth for dilated motion |
|
|
//refer to ue/fsr2 PostProcessFFX_FSR2ConvertVelocity.usf, and using nearest depth for dilated motion |
|
|
|
|
|
|
|
|
|