misc small terrain bugfixes (#5834)

* Removed "chatty" profile markers.
These three markers were making terrain refreshes take ~200% longer in profile builds.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Terrain surface data wasn't updating its AABB correctly.
The code was making an invalid assumption that changes to the world bounds would result in an invalid dirtyRegion.  It actually gets a valid region encapsulating the old and new bounds.  The fix is an additional check to see if the terrain bounds changed.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed previous PR feedback that terrainSystem ought to be a local variable in each test.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
Mike Balfour
2021-11-23 09:21:27 -06:00
committed by GitHub
parent ea0afae502
commit 39ba06b84e
5 changed files with 40 additions and 47 deletions
@@ -191,8 +191,6 @@ namespace GradientSignal
float ImageGradientComponent::GetValue(const GradientSampleParams& sampleParams) const
{
AZ_PROFILE_FUNCTION(Entity);
AZ::Vector3 uvw = sampleParams.m_position;
bool wasPointRejected = false;