Commit Graph

4 Commits (16d6cbca2ad017ed5962429a55caad84f263ac2e)

Author SHA1 Message Date
Mike Balfour c46c558038
Switched Gradient Surface benchmarks to use actual surface components. (#7468)
* Switched Gradient Surface benchmarks to use actual surface components.
The gradient unit tests and benchmarks were previously using a mock surface data system, which led to misleading benchmark results. Now, the actual SurfaceData system gets constructed, and the tests use a mock provider, but the benchmarks use actual shape providers for more realistic benchmarking.

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

* Fixed unit tests to have better query ranges.
Half of each previous range was querying outside the surface provider's data.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Mike Balfour 2b43ad8029
FastNoise GetValues() specialization (#7009)
* Add comparison operator for use from unit tests.

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

* First version of FastNoise benchmarks.

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

* Simplified unit tests and added initial benchmarks.

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

* Add GetValue vs GetValues unit test.

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

* Moved Gradient test code into helper files for use from FastNoise.
Also added benchmarks for each type of FastNoise so that we can have some comparative values handy.

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

* Specialization for GetValues().

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Mike Balfour c403fa3db6
More GetValues() overrides (#6896)
* Benchmarks and tests for Image and Constant GetValues

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

* Verify GetValues for Perlin and Random Gradients

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

* Standardized the assert format for GetValues().

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

* More GetValues unit tests and test cleanup

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

* Fixed typos

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

* GetValues() unit tests for surface gradients.

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

* Benchmarks for ShapeAreaFalloff Gradient

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

* Added benchmarks for all remaining gradients and cleaned up the helper methods.

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

* Renamed class for better report formatting.

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

* Added missing Mocks dependencies for the Editor tests.

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

* First batch of specific GetValues() overrides.
Each one is measurably faster than the generic version.  Also, in ShapeAreaFalloffGradient, I optimized and simplified the logic a bit, so GetValue() is marginally faster too.

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

* Change GetValues() to use span and add more overrides.

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

* Convert GetValues() to use AZStd::span and added more overrides.

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

* Add missing include.

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

* PR feedback - switch to fill

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

* Fixed the logic and added unit tests and comments.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Mike Balfour ffa9cc3a66
Unit tests and benchmarks for GetValues() (#6823)
* Benchmarks and tests for Image and Constant GetValues

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

* Verify GetValues for Perlin and Random Gradients

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

* Standardized the assert format for GetValues().

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

* More GetValues unit tests and test cleanup

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

* Fixed typos

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

* GetValues() unit tests for surface gradients.

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

* Benchmarks for ShapeAreaFalloff Gradient

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

* Added benchmarks for all remaining gradients and cleaned up the helper methods.

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

* Renamed class for better report formatting.

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

* Added missing Mocks dependencies for the Editor tests.

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