Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define MAX_IBL_SAMPLE_CNT 89
#endif

RWTexture2D<float4> output; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS]
RWTexture2D<float4> outputResult; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS]

#pragma kernel ComputeGgxIblSampleData

Expand All @@ -33,7 +33,7 @@ void ComputeGgxIblSampleData(uint3 groupThreadId : SV_GroupThreadID)

if (sampleIndex >= sampleCount)
{
output[texCoord] = float4(0, 0, 0, 0);
outputResult[texCoord] = float4(0, 0, 0, 0);
return;
}

Expand Down Expand Up @@ -82,6 +82,6 @@ void ComputeGgxIblSampleData(uint3 groupThreadId : SV_GroupThreadID)
float pdf = 0.25 * D_GGX(NdotH, roughness);
float omegaS = rcp(sampleCount) * rcp(pdf);

output[texCoord] = float4(localL, omegaS);
outputResult[texCoord] = float4(localL, omegaS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public override void Initialize(CommandBuffer cmd)

void InitializeGgxIblSampleData(CommandBuffer cmd)
{
m_ComputeGgxIblSampleDataCS.SetTexture(m_ComputeGgxIblSampleDataKernel, "output", m_GgxIblSampleData);
m_ComputeGgxIblSampleDataCS.SetTexture(m_ComputeGgxIblSampleDataKernel, "outputResult", m_GgxIblSampleData);
cmd.DispatchCompute(m_ComputeGgxIblSampleDataCS, m_ComputeGgxIblSampleDataKernel, 1, 1, 1);
}

Expand Down