Skip to content

Commit e47a172

Browse files
authored
Fix for unused resources in depth of field (#4796)
1 parent c674c41 commit e47a172

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/DepthOfFieldTileMax.compute

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@ void KMain(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : S
3636
{
3737
uint threadIdx = groupThreadId.y * TILE_SIZE + groupThreadId.x;
3838

39+
#if NEAR
3940
gs_cacheNear[threadIdx] = _InputNearCoCTexture[COORD_TEXTURE2D_X(min(dispatchThreadId, Size))].x;
41+
#endif
42+
43+
#if FAR
4044
gs_cacheFar[threadIdx] = _InputFarCoCTexture[COORD_TEXTURE2D_X(min(dispatchThreadId, Size))].x;
45+
#endif
4146

4247
GroupMemoryBarrierWithGroupSync();
4348

@@ -47,8 +52,13 @@ void KMain(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupThreadId : S
4752
{
4853
if (threadIdx < s)
4954
{
55+
#if NEAR
5056
gs_cacheNear[threadIdx] = max(gs_cacheNear[threadIdx], gs_cacheNear[threadIdx + s]);
57+
#endif
58+
59+
#if FAR
5160
gs_cacheFar[threadIdx] = max(gs_cacheFar[threadIdx], gs_cacheFar[threadIdx + s]);
61+
#endif
5262
}
5363

5464
GroupMemoryBarrierWithGroupSync();

0 commit comments

Comments
 (0)