This repository was archived by the owner on Nov 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
PostProcessing/Shaders/Builtins Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -52,24 +52,14 @@ void MAIN(uint2 groupThreadId : SV_GroupThreadID)
52
52
53
53
// Parallel reduction to find the max value
54
54
UNITY_UNROLL
55
- for (uint i = HISTOGRAM_BINS >> 1u; i > 32u ; i >>= 1u)
55
+ for (uint i = HISTOGRAM_BINS >> 1u; i > 0u ; i >>= 1u)
56
56
{
57
57
if (thread_id < i)
58
58
gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + i]);
59
59
60
60
GroupMemoryBarrierWithGroupSync();
61
61
}
62
62
63
- if (thread_id < 32u)
64
- {
65
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 32]);
66
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 16]);
67
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 8]);
68
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 4]);
69
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 2]);
70
- gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + 1]);
71
- }
72
-
73
63
GroupMemoryBarrierWithGroupSync();
74
64
75
65
if (thread_id == 0u)
You can’t perform that action at this time.
0 commit comments