From c7caecf231e836894c0d16a691fdc1c988e3e575 Mon Sep 17 00:00:00 2001 From: Sebastien Lagarde Date: Tue, 14 Apr 2020 12:39:18 +0200 Subject: [PATCH] fix switch shader compilation --- .../Material/GGXConvolution/ComputeGgxIblSampleData.compute | 6 +++--- .../Runtime/Material/GGXConvolution/IBLFilterGGX.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute index de02fb64dcf..d8445386ed7 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/ComputeGgxIblSampleData.compute @@ -11,7 +11,7 @@ #define MAX_IBL_SAMPLE_CNT 89 #endif -RWTexture2D output; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS] +RWTexture2D outputResult; // [MAX_SAMPLE_CNT x UNITY_SPECCUBE_LOD_STEPS] #pragma kernel ComputeGgxIblSampleData @@ -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; } @@ -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); } } diff --git a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs index 1f3df886b42..5ef402930e4 100644 --- a/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs +++ b/com.unity.render-pipelines.high-definition/Runtime/Material/GGXConvolution/IBLFilterGGX.cs @@ -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); }