Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 8288473

Browse files
committed
Debug histogram shader simplification
1 parent 704f556 commit 8288473

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

PostProcessing/Shaders/Debug/Histogram.compute

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ void KHistogramGather(uint2 dispatchThreadId : SV_DispatchThreadID, uint2 groupT
3838
float channel;
3939
uint c = uint(_Params.w);
4040

41-
if (c == 0) channel = color.r;
42-
else if (c == 1) channel = color.g;
43-
else if (c == 2) channel = color.b;
44-
else channel = Luminance(color);
41+
if (c > 2) channel = Luminance(color);
42+
else channel = color[c];
4543

4644
uint idx = (uint)(round(channel * 255.0));
4745

0 commit comments

Comments
 (0)