* Misc SurfaceData Optimizations.
This includes a few different optimizations found while trying to make the bulk query APIs faster:
* Switches mutexes over to shared_lock to optimize for the multi-reader-single-writer pattern
* Surface provider point creation now uses a pre-created set of masks to initialize with, and uses std::move() to move the created point into the output list instead of copying it.
* Splits CombineSortAndFilterNeightboringPoints so that the FilterPoints() can occur separately and efficiently with erase/remove_if, and avoids making a copy of the output points.
* Optimized SurfaceDataShapeComponent::ModifySurfacePoints
* Fixed potential bug where the sort wasn't stable since it only compared the Z value, and could have produced unexpected results for differing points with the exact same Z value.
* Fixed up a couple small bugs and missing checks in the unit tests
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Fixed syntax on unit tests.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
Changed the DiffuseGI passes to override IsEnabled() instead of exiting early from FrameBeginInternal.
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
* Updated all array_view uses with the C++20 span.
The updates were done in the following order
1. `AZStd::array_view<([^>].+)\* ?>` -> `AZStd::span<\1 const>`
2. `AZStd::array_view<(?:const )(.+)>` -> `AZStd::span<const \1>`
3. `AZStd::array_view` -> `AZStd::span`
Removed the implementation of array_view.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added missing whitespace between `const` and the typename for spans.
Updated the ShaderTest comparison of the ShaderResourceGroupLayout span
to compare the sizes as well
Updated comments on some of the methods that stated that they return "an
array" to mention they return "a span".
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
There were lots of material system conflicts that had to be resolved. I expect the build is broken at this commit, and I'll fix it in followup commits.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
* initial fix for geometry being intersected when not visible
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add tests for shape intersection with helpers enabled/disabled
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update moved cmake file after merge
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* updates following PR feedback
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* ensure render geometry is refreshed when the mesh component controller is moved
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* cache bus pointer and send update notification when mesh changes
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* add integration test to detect MeshComponentController notification to IntersectionNotificationBus
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* remove optimize off
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* update build visibility for AtomLyIntegration editor static lib
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
* move runtime dependencies to gem module
Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
Here the class has been generalized for a list of group names and a final property name, rather than assuming a single group containing the property. This included removing the unused GetPropertyName and GetGroupName functions. All that's really need from this class is conversion to a full property ID string.
Testing:
New unit test.
Reprocessed all core material types and StandardPBR test materials used in Atom Sample Viewer's material screenshot test.
Atom Sample Viewer material screenshot test script.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
Added supervariants to the precompiled DiffuseProbeGrid shaders for the NumRaysPerProbe values
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
Atom tools are set up to inherit and automatically load all of the gems used by the game project. This is a great simplification that saves us from having to manually update cmake settings for every game project to push dependencies to every tool. The tradeoff is that some dependencies will be added to certain tools that have no relevance whatsoever, potentially wasting initialization time, memory utilization, and some processing. This change follows an existing example to update a couple of tools to forego initializing unused gems. They can easily be reenabled as needed.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
The CriticalAssetsCompiled event can be handled to detect when the
AssetProcessor has finished processing Critical Assets
Also with the new event, an audit has been performed over all the
locations where the AssetCatalogEventBus OnCatalogLoaded event was being
handle to make sure it was the proper event to use.
If the handler was actually examing the enumerating over the full
catalog or querying all assets within the catalog, then it was a proper
use.
For handlers that were interested in a particular asset it was not
Moreover added implementations of `OnCatalogAssetChanged` and
`OnCatalogAssetAdded` to the FileTagComponent and the MaterialViewportComponent.
Any applications which uses the AtomToolsApplication
class(MaterialEditor, AtomSampleViewerStandalone,
ShaderMangementConsole) now signals a "CriticalAssetsCompiled" lifecycle
event as well as loads the "assetcatalog.xml" if it exists.
The Launcher application signals the "CrticalAssetsCompiled" event and
reloads the "assetcatalog.xml" for the ${project}.GameLauncher and
${project}.ServerLauncher in Launcher.cpp
Finally the Editor signals the "CriticalAssetsCompiled" and reloads the
"assetcatalog.xml" in CryEdit.cpp
resolves#6093
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Bugfix: AreaIds don't compare correctly when the priority bus doesn't have a listener.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
(cherry picked from commit eb9e95fcb3884dee638b9032785b828359b0d8c0)
* Bugfix: Only deactivate a component if it's currently active.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
(cherry picked from commit 7c9e4b7de49e8fe009616651d6e09f66c356db38)
* Switched shared_lock to unique_lock, since the data is being written to.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Moved Legacy::CryCommon build dependency to correct location.
It was a public build dependency in FastNoise and GradientSignal, but really only should be a private dependency in Vegetation due to the vegetation system needing some init/shutdown events.
Fixing this up also required cleanup of a few unused legacy remnants in other files.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* InWorldBounds was incorrectly checking the X bounds against the Z bounds.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Removed some additional unneeded legacy code that was now causing compile errors.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Addressed PR feedback.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Adjusted cmake dependencies again, based on what's needed in the public header files in the gems.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Second attempt at the Deactivate() fix, this time by tracking the nested component state.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Addressed PR feedback, made operation symmetrical.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
* Added CryCommon privately to other veg modules too, since they all reference AreaSystemComponent, which uses the legacy events.
Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
The bug reported that overridden texture properties would be lost whenever an entity was created, destroyed, or a prefab was created. Initially, it seemed like there was a problem with the custom JSON serializer for material properties. Debugging proved this to be incorrect because all of the data was converted to JSON values in the serializer on multiple passes. At some point during prefab patching, the data for the asset properties is lost while other values like colors and floats serialize correctly. Converting the asset data values into asset IDs resolves the immediate problem for the material component but the underlying issue is still under investigation by the prefab team. This change is being posted for review in case the underlying issue cannot be resolved in time for the next release.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Fixing unittests and moving texture conversion into material component controller
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Switched to HDR irradiance.
SDK Update.
Fixed a Vulkan validation error on RayTracingSceneSrg::MeshInfo.
Improvements to DiffuseProbeGrid blending.
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
* Adds crc validation checks
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Fixes invalid CRCs
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Changes test to smoke suite
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* excludes some test data from the validator
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* uses pathlib instead of os.path
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* fixes wrong path to test scripts
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
* Escape not needed
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
A source model asset can have multiple products including models and materials.
It’s not guaranteed that the first entry in the list of products for a model asset will be a model.
In this case the first product was the default material asset.
This caused some model previews to render a gray sphere depicting the default material.
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Moved settings registry wrapper function to atom tools framework
Created registry settings with default values for preview configurations based on asset type
Changed lighting preset previews and thumbnails to use reflective material
Created registry settings for preset selection dialog borders, padding, sizes
Updated shared preview utility functions to compare against registered asset types instead of passing them in individually
Signed-off-by: Guthrie Adams <guthadam@amazon.com>