Merge branch 'Atom/guthadam/atomtools_updating_cmake_config' into Atom/guthadam/atomtools_updating_cmake_config_plus_bootstrap
This commit is contained in:
@@ -763,6 +763,10 @@ namespace MaterialEditor
|
||||
return false;
|
||||
}
|
||||
|
||||
// Pipeline State Object changes are always allowed in the material editor because it only runs on developer systems
|
||||
// where such changes are supported at runtime.
|
||||
m_materialInstance->SetPsoHandlingOverride(AZ::RPI::MaterialPropertyPsoHandling::Allowed);
|
||||
|
||||
// Populate the property map from a combination of source data and assets
|
||||
// Assets must still be used for now because they contain the final accumulated value after all other materials
|
||||
// in the hierarchy are applied
|
||||
|
||||
@@ -70,22 +70,6 @@ namespace MaterialEditor
|
||||
m_scene = AZ::RPI::Scene::CreateScene(sceneDesc);
|
||||
m_scene->EnableAllFeatureProcessors();
|
||||
|
||||
// Setup scene srg modification callback.
|
||||
AZ::RPI::ShaderResourceGroupCallback callback = [this](AZ::RPI::ShaderResourceGroup* srg)
|
||||
{
|
||||
if (srg == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
AZ::RHI::ShaderInputConstantIndex timeIndex = srg->FindShaderInputConstantIndex(AZ::Name{ "m_time" });
|
||||
if (timeIndex.IsValid())
|
||||
{
|
||||
srg->SetConstant(timeIndex, m_simulateTime);
|
||||
srg->Compile();
|
||||
}
|
||||
};
|
||||
m_scene->SetShaderResourceGroupCallback(callback);
|
||||
|
||||
// Bind m_defaultScene to the GameEntityContext's AzFramework::Scene
|
||||
auto sceneSystem = AzFramework::SceneSystemInterface::Get();
|
||||
AZ_Assert(sceneSystem, "MaterialViewportRenderer was unable to get the scene system during construction.");
|
||||
@@ -441,14 +425,12 @@ namespace MaterialEditor
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialViewportRenderer::OnTick(float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
|
||||
void MaterialViewportRenderer::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
|
||||
{
|
||||
m_renderPipeline->AddToRenderTickOnce();
|
||||
|
||||
PerformanceMonitorRequestBus::Broadcast(&PerformanceMonitorRequestBus::Handler::GatherMetrics);
|
||||
|
||||
m_simulateTime += deltaTime;
|
||||
|
||||
if (m_shadowCatcherMaterial)
|
||||
{
|
||||
// Compile the m_shadowCatcherMaterial in OnTick because changes can only be compiled once per frame.
|
||||
|
||||
@@ -109,8 +109,6 @@ namespace MaterialEditor
|
||||
AZ::Entity* m_iblEntity = nullptr;
|
||||
AZ::Render::SkyBoxFeatureProcessorInterface* m_skyboxFeatureProcessor = nullptr;
|
||||
|
||||
float m_simulateTime = 0;
|
||||
|
||||
AZStd::shared_ptr<MaterialEditorViewportInputController> m_viewportController;
|
||||
};
|
||||
} // namespace MaterialEditor
|
||||
|
||||
Reference in New Issue
Block a user