Removed modelToWorldInverse from the stencil Srg.
Signed-off-by: dmcdiar <dmcdiar@amazon.com>
This commit is contained in:
@@ -142,7 +142,6 @@ namespace AZ
|
||||
Vector3 innerExtentsReduced = m_innerExtents - Vector3(0.1f, 0.1f, 0.1f);
|
||||
Matrix3x4 modelToWorldStencil = Matrix3x4::CreateFromQuaternionAndTranslation(m_transform.GetRotation(), m_transform.GetTranslation()) * Matrix3x4::CreateScale(innerExtentsReduced);
|
||||
m_stencilSrg->SetConstant(m_reflectionRenderData->m_modelToWorldStencilConstantIndex, modelToWorldStencil);
|
||||
m_stencilSrg->SetConstant(m_reflectionRenderData->m_modelToWorldInverseStencilConstantIndex, modelToWorldStencil.GetInverseFull());
|
||||
m_stencilSrg->Compile();
|
||||
|
||||
Matrix3x4 modelToWorldInverse = Matrix3x4::CreateFromTransform(m_transform).GetInverseFull();
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace AZ
|
||||
RHI::DrawListTag m_renderInnerDrawListTag;
|
||||
|
||||
RHI::ShaderInputConstantIndex m_modelToWorldStencilConstantIndex;
|
||||
RHI::ShaderInputConstantIndex m_modelToWorldInverseStencilConstantIndex;
|
||||
RHI::ShaderInputConstantIndex m_modelToWorldRenderConstantIndex;
|
||||
RHI::ShaderInputConstantIndex m_modelToWorldInverseRenderConstantIndex;
|
||||
RHI::ShaderInputConstantIndex m_outerObbHalfLengthsRenderConstantIndex;
|
||||
|
||||
+1
-4
@@ -92,10 +92,6 @@ namespace AZ
|
||||
m_reflectionRenderData.m_modelToWorldStencilConstantIndex = stencilSrgLayout->FindShaderInputConstantIndex(modelToWorldConstantName);
|
||||
AZ_Error("ReflectionProbeFeatureProcessor", m_reflectionRenderData.m_modelToWorldStencilConstantIndex.IsValid(), "Failed to find stencil shader input constant [%s]", modelToWorldConstantName.GetCStr());
|
||||
|
||||
Name modelToWorldInverseConstantName = Name("m_modelToWorldInverse");
|
||||
m_reflectionRenderData.m_modelToWorldInverseStencilConstantIndex = stencilSrgLayout->FindShaderInputConstantIndex(modelToWorldInverseConstantName);
|
||||
AZ_Error("ReflectionProbeFeatureProcessor", m_reflectionRenderData.m_modelToWorldInverseStencilConstantIndex.IsValid(), "Failed to find stencil shader input constant [%s]", modelToWorldInverseConstantName.GetCStr());
|
||||
|
||||
// cache probe render shader indices
|
||||
// Note: the outer and inner render shaders use the same Srg
|
||||
Data::Instance<RPI::ShaderResourceGroup> renderReflectionSrg = RPI::ShaderResourceGroup::Create(
|
||||
@@ -108,6 +104,7 @@ namespace AZ
|
||||
m_reflectionRenderData.m_modelToWorldRenderConstantIndex = renderReflectionSrgLayout->FindShaderInputConstantIndex(modelToWorldConstantName);
|
||||
AZ_Error("ReflectionProbeFeatureProcessor", m_reflectionRenderData.m_modelToWorldRenderConstantIndex.IsValid(), "Failed to find render shader input constant [%s]", modelToWorldConstantName.GetCStr());
|
||||
|
||||
Name modelToWorldInverseConstantName = Name("m_modelToWorldInverse");
|
||||
m_reflectionRenderData.m_modelToWorldInverseRenderConstantIndex = renderReflectionSrgLayout->FindShaderInputConstantIndex(modelToWorldInverseConstantName);
|
||||
AZ_Error("ReflectionProbeFeatureProcessor", m_reflectionRenderData.m_modelToWorldRenderConstantIndex.IsValid(), "Failed to find render shader input constant [%s]", modelToWorldInverseConstantName.GetCStr());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user