|
|
|
|
@ -115,10 +115,13 @@ namespace AZ
|
|
|
|
|
AZ_Assert(m_shaderResourceGroup, "RayTracingPass [%s]: Failed to create RayTracingGlobalSrg", GetPathName().GetCStr());
|
|
|
|
|
RPI::PassUtils::BindDataMappingsToSrg(m_passDescriptor, m_shaderResourceGroup.get());
|
|
|
|
|
|
|
|
|
|
// check to see if the shader requires the View and RayTracingMaterial Srgs
|
|
|
|
|
// check to see if the shader requires the View, Scene, or RayTracingMaterial Srgs
|
|
|
|
|
const auto& viewSrgLayout = m_rayGenerationShader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::View);
|
|
|
|
|
m_requiresViewSrg = (viewSrgLayout != nullptr);
|
|
|
|
|
|
|
|
|
|
const auto& sceneSrgLayout = m_rayGenerationShader->FindShaderResourceGroupLayout(RPI::SrgBindingSlot::Scene);
|
|
|
|
|
m_requiresSceneSrg = (sceneSrgLayout != nullptr);
|
|
|
|
|
|
|
|
|
|
const auto& rayTracingMaterialSrgLayout = m_rayGenerationShader->FindShaderResourceGroupLayout(RayTracingMaterialSrgBindingSlot);
|
|
|
|
|
m_requiresRayTracingMaterialSrg = (rayTracingMaterialSrgLayout != nullptr);
|
|
|
|
|
|
|
|
|
|
@ -324,6 +327,11 @@ namespace AZ
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_requiresSceneSrg)
|
|
|
|
|
{
|
|
|
|
|
shaderResourceGroups.push_back(scene->GetShaderResourceGroup()->GetRHIShaderResourceGroup());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_requiresRayTracingMaterialSrg)
|
|
|
|
|
{
|
|
|
|
|
shaderResourceGroups.push_back(rayTracingFeatureProcessor->GetRayTracingMaterialSrg()->GetRHIShaderResourceGroup());
|
|
|
|
|
|