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

Commit c391f93

Browse files
committed
Fixed whitespace issues.
1 parent 4b93a3a commit c391f93

6 files changed

Lines changed: 27 additions & 30 deletions

File tree

PostProcessing/Runtime/Effects/ColorGrading.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ void RenderHDRPipeline(PostProcessRenderContext context)
225225
}
226226

227227
bool isAndroidOpenGL = Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan;
228-
int groupSizeXY = Mathf.CeilToInt(k_Lut3DSize / 8f);
229-
int groupSizeZ = Mathf.CeilToInt(k_Lut3DSize / (isAndroidOpenGL ? 2f : 8f));
228+
int groupSizeXY = Mathf.CeilToInt(k_Lut3DSize / 8f);
229+
int groupSizeZ = Mathf.CeilToInt(k_Lut3DSize / (isAndroidOpenGL ? 2f : 8f));
230230
var cmd = context.command;
231231
cmd.SetComputeTextureParam(compute, kernel, "_Output", m_InternalLogLut);
232232
cmd.SetComputeVectorParam(compute, "_Size", new Vector4(k_Lut3DSize, 1f / (k_Lut3DSize - 1f), 0f, 0f));

PostProcessing/Runtime/Monitors/HistogramMonitor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ public enum Channel
2020
ComputeBuffer m_Data;
2121
private int numBins;
2222
private int threadGroupSizeX;
23-
private int threadGroupSizeY;
23+
private int threadGroupSizeY;
2424

25-
internal override void OnEnable()
26-
{
27-
base.OnEnable();
25+
internal override void OnEnable()
26+
{
27+
base.OnEnable();
2828

2929
bool isAndroidOpenGL = Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan;
3030

3131
numBins = isAndroidOpenGL ? 128 : 256;
3232
threadGroupSizeX = isAndroidOpenGL ? 16 : 16;
3333
threadGroupSizeY = isAndroidOpenGL ? 8 : 16;
34-
}
34+
}
3535

3636
internal override void OnDisable()
3737
{

PostProcessing/Runtime/Monitors/VectorscopeMonitor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public sealed class VectorscopeMonitor : Monitor
1010

1111
ComputeBuffer m_Data;
1212
private int threadGroupSizeX;
13-
private int threadGroupSizeY;
13+
private int threadGroupSizeY;
1414

1515
internal override void OnDisable()
1616
{
@@ -21,16 +21,16 @@ internal override void OnDisable()
2121

2222
m_Data = null;
2323
}
24-
25-
internal override void OnEnable()
26-
{
27-
base.OnEnable();
24+
25+
internal override void OnEnable()
26+
{
27+
base.OnEnable();
2828

2929
bool isAndroidOpenGL = Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan;
3030

3131
threadGroupSizeX = isAndroidOpenGL ? 16 : 16;
3232
threadGroupSizeY = isAndroidOpenGL ? 8 : 16;
33-
}
33+
}
3434

3535
internal override bool NeedsHalfRes()
3636
{

PostProcessing/Runtime/Monitors/WaveformMonitor.cs

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,9 @@ public sealed class WaveformMonitor : Monitor
1010

1111
ComputeBuffer m_Data;
1212

13-
private int threadGroupSize;
14-
private int threadGroupSizeX;
15-
private int threadGroupSizeY;
16-
17-
private string clearKernelName;
18-
private string gatherKernelName;
13+
private int threadGroupSize;
14+
private int threadGroupSizeX;
15+
private int threadGroupSizeY;
1916

2017
internal override void OnDisable()
2118
{
@@ -27,16 +24,16 @@ internal override void OnDisable()
2724
m_Data = null;
2825
}
2926

30-
internal override void OnEnable()
31-
{
32-
base.OnEnable();
27+
internal override void OnEnable()
28+
{
29+
base.OnEnable();
3330

3431
bool isAndroidOpenGL = Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan;
3532

3633
threadGroupSize = isAndroidOpenGL ? 128 : 256;
3734
threadGroupSizeX = isAndroidOpenGL ? 16 : 16;
3835
threadGroupSizeY = isAndroidOpenGL ? 8 : 16;
39-
}
36+
}
4037

4138
internal override bool NeedsHalfRes()
4239
{
@@ -78,7 +75,7 @@ internal override void Render(PostProcessRenderContext context)
7875
int kernel = compute.FindKernel("KWaveformClear");
7976
cmd.SetComputeBufferParam(compute, kernel, "_WaveformBuffer", m_Data);
8077
cmd.SetComputeVectorParam(compute, "_Params", parameters);
81-
cmd.DispatchCompute(compute, kernel, Mathf.CeilToInt(width / (float)threadGroupSizeX), Mathf.CeilToInt(height / (float)threadGroupSizeY), 1);
78+
cmd.DispatchCompute(compute, kernel, Mathf.CeilToInt(width / (float)threadGroupSizeX), Mathf.CeilToInt(height / (float)threadGroupSizeY), 1);
8279

8380
// For performance reasons, especially on consoles, we'll just downscale the source
8481
// again to reduce VMEM stalls. Eventually the whole algorithm needs to be rewritten as
@@ -91,7 +88,7 @@ internal override void Render(PostProcessRenderContext context)
9188
cmd.SetComputeBufferParam(compute, kernel, "_WaveformBuffer", m_Data);
9289
cmd.SetComputeTextureParam(compute, kernel, "_Source", ShaderIDs.WaveformSource);
9390
cmd.SetComputeVectorParam(compute, "_Params", parameters);
94-
cmd.DispatchCompute(compute, kernel, width, Mathf.CeilToInt(height / (float)threadGroupSize), 1);
91+
cmd.DispatchCompute(compute, kernel, width, Mathf.CeilToInt(height / (float)threadGroupSize), 1);
9592
cmd.ReleaseTemporaryRT(ShaderIDs.WaveformSource);
9693

9794
// Generate the waveform texture

PostProcessing/Runtime/Utils/LogHistogram.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ public sealed class LogHistogram
1414

1515
public void Generate(PostProcessRenderContext context)
1616
{
17-
if (data == null)
18-
{
17+
if (data == null)
18+
{
1919
bool isAndroidOpenGL = Application.platform == RuntimePlatform.Android && SystemInfo.graphicsDeviceType != GraphicsDeviceType.Vulkan;
2020
threadX = isAndroidOpenGL ? 16 : 16;
2121
threadY = isAndroidOpenGL ? 8 : 16;
22-
data = new ComputeBuffer (k_Bins, sizeof(uint));
23-
}
22+
data = new ComputeBuffer (k_Bins, sizeof(uint));
23+
}
2424

2525
var scaleOffsetRes = GetHistogramScaleOffsetRes(context);
2626
var compute = context.resources.computeShaders.exposureHistogram;

PostProcessing/Shaders/Builtins/ExposureHistogram.compute

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RWStructuredBuffer<uint> _HistogramBuffer;
99
Texture2D<float4> _Source;
1010

1111
CBUFFER_START(Params)
12-
float4 _ScaleOffsetRes; // x: scale, y: offset, z: width, w: height
12+
float4 _ScaleOffsetRes; // x: scale, y: offset, z: width, w: height
1313
CBUFFER_END
1414

1515
groupshared uint gs_histogram[HISTOGRAM_BINS];

0 commit comments

Comments
 (0)