Atom Timer fix - changed milliseconds to seconds (#4631)

* Atom Timer fix - changed milliseconds to seconds

- Tested on both fog and EyeAdaptation animations - both are the only affected and were broken before
- This is a small fix for pull #3969 that replaced the timer mechanism: https://github.com/o3de/o3de/pull/3969

Signed-off-by: Adi-Amazon <barlev@amazon.com>

* Atom Timer fix - using seconds to begin with and removing obsolete variable

Signed-off-by: Adi-Amazon <barlev@amazon.com>
This commit is contained in:
Adi Bar-Lev
2021-10-12 15:40:12 -04:00
committed by GitHub
parent c355c162ab
commit 05767f2d2b
3 changed files with 2 additions and 7 deletions
@@ -228,9 +228,6 @@ namespace AZ
PipelineViewMap m_pipelineViewsByTag;
/// The system time when the last time this pipeline render was started
float m_lastRenderStartTime = 0;
// RenderPipeline's name id, it will be used to identify the render pipeline when it's added to a Scene
RenderPipelineId m_nameId;
@@ -263,7 +263,7 @@ namespace AZ
AZ::TickRequestBus::BroadcastResult(m_tickTime.m_gameDeltaTime, &AZ::TickRequestBus::Events::GetTickDeltaTime);
ScriptTimePoint currentTime;
AZ::TickRequestBus::BroadcastResult(currentTime, &AZ::TickRequestBus::Events::GetTimeAtCurrentTick);
m_tickTime.m_currentGameTime = static_cast<float>(currentTime.GetMilliseconds());
m_tickTime.m_currentGameTime = static_cast<float>(currentTime.GetSeconds());
}
void RPISystem::RenderTick()
@@ -375,12 +375,10 @@ namespace AZ
m_scene->RemoveRenderPipeline(m_nameId);
}
void RenderPipeline::OnStartFrame(const TickTimeInfo& tick)
void RenderPipeline::OnStartFrame([[maybe_unused]] const TickTimeInfo& tick)
{
AZ_PROFILE_SCOPE(RPI, "RenderPipeline: OnStartFrame");
m_lastRenderStartTime = tick.m_currentGameTime;
OnPassModified();
for (auto& viewItr : m_pipelineViewsByTag)