Terrain/mbalfour/misc bugfixes (#6712)

* Bumped up terrain world limit to allow up to (and including) 4096 x 4096.

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

* Changed loop calculations to handle floating-point math better.
By looping on floating-point values, query resolutions of unstable values like "0.200000007" would sometimes cause the loop to go one more time than it should.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
This commit is contained in:
Mike Balfour
2022-01-06 09:19:42 -06:00
committed by GitHub
parent 66985e3569
commit 14661af13f
2 changed files with 16 additions and 16 deletions
@@ -139,8 +139,8 @@ namespace Terrain
AZ::Outcome<void, AZStd::string> TerrainWorldConfig::DetermineMessage(float numSamples)
{
const float maximumSamplesAllowed = 8.0f * 1024.0f * 1024.0f;
if (numSamples < maximumSamplesAllowed)
const float maximumSamplesAllowed = 16.0f * 1024.0f * 1024.0f;
if (numSamples <= maximumSamplesAllowed)
{
return AZ::Success();
}