Bladeren bron

Fixed crash when doing Cubemap Captures.

The crash was introduced by this #17974 almost a year ago.

Fixed it by reverting it to its previous version:
```
m_previousGlobalIblExposure = sceneSrg->GetConstant<float>(m_globalIblExposureConstantIndex);
m_previousSkyBoxExposure = sceneSrg->GetConstant<float>(m_skyBoxExposureConstantIndex);
```

Signed-off-by: galibzon <[email protected]>
galibzon 3 maanden geleden
bovenliggende
commit
d35beab60d
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      Gems/Atom/Feature/Common/Code/Source/CubeMapCapture/CubeMapRenderer.cpp

+ 2 - 2
Gems/Atom/Feature/Common/Code/Source/CubeMapCapture/CubeMapRenderer.cpp

@@ -59,8 +59,8 @@ namespace AZ
 
 
             // store the current exposure values
             // store the current exposure values
             Data::Instance<RPI::ShaderResourceGroup> sceneSrg = m_scene->GetShaderResourceGroup();
             Data::Instance<RPI::ShaderResourceGroup> sceneSrg = m_scene->GetShaderResourceGroup();
-            m_previousGlobalIblExposure = sceneSrg->GetConstant<float>(m_globalIblExposureConstantIndex.GetConstantIndex());
-            m_previousSkyBoxExposure = sceneSrg->GetConstant<float>(m_skyBoxExposureConstantIndex.GetConstantIndex());
+            m_previousGlobalIblExposure = sceneSrg->GetConstant<float>(m_globalIblExposureConstantIndex);
+            m_previousSkyBoxExposure = sceneSrg->GetConstant<float>(m_skyBoxExposureConstantIndex);
 
 
             // add the pipeline to the scene
             // add the pipeline to the scene
             m_scene->AddRenderPipeline(environmentCubeMapPipeline);
             m_scene->AddRenderPipeline(environmentCubeMapPipeline);