Always relocate probes after the texture is cleared

Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
monroegm-disable-blank-issue-2
dmcdiarmid-ly 4 years ago
parent 5f7a30f8da
commit ec76a4d647

@ -121,9 +121,6 @@ namespace AZ
// recompute the number of probes since the spacing changed // recompute the number of probes since the spacing changed
UpdateProbeCount(); UpdateProbeCount();
// probes need to be relocated since the grid density changed
m_remainingRelocationIterations = DefaultNumRelocationIterations;
m_updateTextures = true; m_updateTextures = true;
} }
@ -174,9 +171,6 @@ namespace AZ
m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_renderExtents / 2.0f); m_obbWs = Obb::CreateFromPositionRotationAndHalfLengths(m_transform.GetTranslation(), m_transform.GetRotation(), m_renderExtents / 2.0f);
// probes need to be relocated since the grid extents changed
m_remainingRelocationIterations = DefaultNumRelocationIterations;
m_updateTextures = true; m_updateTextures = true;
} }
@ -206,9 +200,6 @@ namespace AZ
} }
m_updateTextures = true; m_updateTextures = true;
// probes need to be relocated since the mode has changed
m_remainingRelocationIterations = DefaultNumRelocationIterations;
} }
void DiffuseProbeGrid::SetBakedTextures(const DiffuseProbeGridBakedTextures& bakedTextures) void DiffuseProbeGrid::SetBakedTextures(const DiffuseProbeGridBakedTextures& bakedTextures)
@ -363,6 +354,9 @@ namespace AZ
[[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(request); [[maybe_unused]] RHI::ResultCode result = m_renderData->m_imagePool->InitImage(request);
AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeDataImage image"); AZ_Assert(result == RHI::ResultCode::Success, "Failed to initialize m_probeDataImage image");
} }
// probes need to be relocated since the textures changed
m_remainingRelocationIterations = DefaultNumRelocationIterations;
} }
m_updateTextures = false; m_updateTextures = false;

Loading…
Cancel
Save