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)
5252
5353 // Parallel reduction to find the max value
5454 UNITY_UNROLL
55- for (uint i = HISTOGRAM_BINS >> 1u; i > 32u ; i >>= 1u)
55+ for (uint i = HISTOGRAM_BINS >> 1u; i > 0u ; i >>= 1u)
5656 {
5757 if (thread_id < i)
5858 gs_pyramid[thread_id] = max(gs_pyramid[thread_id], gs_pyramid[thread_id + i]);
5959
6060 GroupMemoryBarrierWithGroupSync();
6161 }
6262
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-
7363 GroupMemoryBarrierWithGroupSync();
7464
7565 if (thread_id == 0u)
You can’t perform that action at this time.
0 commit comments