* Fixed organization of the AssetProcessor SourceAssetBrowser
Assets within the Engine Root were grouped under a '/' entry.
That has been fixed to use the relative path within the engine root for
those assets
Assets outside of the Engine Root, but on the same drive were using
absolute paths before. Now there are child entries that navigate up the
directory hierarchy to those asset locations
* Added ly_enable_gems call to Atom gems targets that are required
The DefaultLevel.prefab contains several Atom components, that require
the Atom RHI, RPI, Common_Feature, ShaderBuilder and AtomLyIntegration CommonFeatures
gems to be enabled in order to successfully process in the
AssetProcessor.
* Added ly_enable_gems call to make the Camera gem required in Tools,
Builders and Clients.
This is needed as the DefaultLevel.prefab contains an Editor Camera
Component
* Adding the ly_enable_gem call to make the Maestro gem required
CrySystem currently requires Maestro to be enabled in order to
initialize
* Added ly_enable_gems call to the SceneProcessing gem to make it required
The SceneCore and SceneData libraries that are part of the core engine
Code folder requires the SceneProcessing gem to be enabled in order to
invoke the InitializeDynamicModule hooks in DllMain.cpp in order to
initialize those libraries.
* Fixed bad argument in comment for Prefab CMakeLists.txt
* Fixed Assert in Asset Builders due to the Atom RPI Builder
The Atom RPI Builder was enabling the Asset Catalog for the ScriptAsset a second time
The Atom Feature Common EditorSystemCommonComponent.cpp which also loads
in the AssetBuilder is enabling the Asset Catalog for the ScriptAsset
Added BehaviorContext reflection to the OutputDeviceTransformType enum
to fix the BehaviorContext errors about reflecting a method that returns
such an enum
* Added TypeId output to the JsonDeserializer report message about missing
ClassData
Previously the report callback would indicate that the target type was
missing Serialization class data, but didn't indicate the TypeId of the
target type
* Added support to the ly_enable_gems function to be able to support
0 gems being enabled.
Updated the Install step for CMake to propagate any ly_enable_gems
within a CMakeLists.txt for a target into the generated CMakeLists.txt
that is made for each installed IMPORTED target
* Adding newline to the end of the Camera Gem CMakeLists.txt
* Fixing target TYPE parameter for actual Gem Modules to use the GEM_MODULE tag instead of MODULE
* Reverting change to the DESTINATION directory for the installed CMakeLists.txt to use the relative path to the installed directory
* Adding the Atom_Bootstrap gem as a required gem
The Client and GameLaunchers required the Atom_Bootstrap gem in order to create the NativeWindow
Added Atom_Feature_Common client module as a runtime dependency of the AtomLyIntegration CommonsFeature client module
* Fixed register.py --all-projects-path and --all-gems-path arguments to
NOT register projects or gems that are within a template folder
Fixed reading of old pre-1.0 o3de_manifest.json files where the
"engines" key was a json array
* Changed how the relative target source directory is calculated when that source directroy resides outside of the engine root.
The final dirname component is used with a unique SHA256 has to form a <dirname>-<8 char SHA256> folder for installing files into
* Adding newline to the end of Atom_Bootstrap CMakeLists.txt
* Moving ly_enable_gems variants for Tools and Builders inside of PAL_TRAIT_BUILD_HOST_TOOLS block
* Adding a comment to AWSCore.ResourceMappingTool target to indicate that it is not a GEM_MODULE.
Furthermore it cannot be loaded with the Gem system because the library is in a different directory the executable
[ATOM-14544] Add Reset() function to IShaderVariantFinder
ShaderVariantAsyncLoader::Reset() now Shutdown and Init(). It clears
the cache of ShaderVariantAssets it keeps in memory.
Signed-off-by: garrieta <garrieta@amazon.com>
The problem was...
After a MaterialAsset reload, there could be two different versions of the MaterialAsset in memory: the old one and the reloaded one. The old one is still connected to buses and can send reinitialization messages when other things reload or reinitialize. So when the shader asset reloaded, both the old and new MaterialAsset were sending reinitialization messages. Material::OnMaterialAssetReinitialized was using the materialAsset parameter to initialize the Material, and the latest call to OnMaterialAssetReinitialized was for the *old* MaterialAsset.
The solution is to use the m_materialAsset member when reinitializing the Material. I also added checks in a couple places to skip unnecessary reinitialization, and added comments in the bus headers to warn developers about this issue.
Testing: Added a new step to ASV's MaterialHotReloadTest.bv.lua script for the error scenario, and this now passes. Ran ASV full test suite, both dx12 and vulkan, only known issues occurred.
- Added a pause button in imgui cpu profiler.
- Added a capture button to save cpu profiling data to a data file.
- Added some profile marks in both RPI and RHI.
This was done while working on "ATOM-15728 Shader Hot Reload Fails in Debug Build", but it turned out these changes did not actually fix the issue (or any other known hot-reload issue). Still, these improvements are appropriate as they correct logical oversights.
ShaderVariant was not listening to asset reloads. It needs to know when the ShaderVariantAsset reload happens so it can reinitialize it's members as well as propagate reinitialization messages. I added a member for the ShaderAsset as the class needs this to reinitialize itself. So now the class listens for reloads of both the ShaderVariantAsset and the ShaderAsset.
Shader was not listening for ShaderAsset reinitialization events.
Updated the API for ShaderReloadNotificationBus's OnShaderVariantReinitialized to include the ShaderVariant which is the most relevant information (the other information wasn't really being used anyway).
ATOM-15728 Shader Hot Reload Fails in Debug Build
The main change was to add OnAssetReady handlers to each of the asset classes. See comments in ShaderAsset::OnAssetReady for a detailed explanation. In short, OnAssetReloaded gets missed while assets are being reloaded at the same time on multiple threads, but OnAssetReady is always called whenever connecting to the AssetBus because of its AssetConnectionPolicy.
The above change required the addition of a new AssetInitBus to call the PostLoadInit() functions. Because OnAssetReady connects to buses that are not mutex-protected, they have to be connected on the main thread. AssetInitBus::PostLoadInit is called every frame in RPISystem::SimulationTick. All Atom's asset handlers that need to do post-load initialization must connect to the AssetInitBus, and the asset will disconnect itself after initialization is complete.
We also need the Shader class to handle OnShaderAssetReinitialized to properly handle the shader reload.
With these changes I can click back and forth between "Blending On" and "Blending Off" many times (like 20 times) without issue.
This is specifically in support of:
ATOM-14613 Baseviewer MatertialHotReloadTest fails to change the color after turning blending on and off
ATOM-15728 Shader Hot Reload Fails in Debug Build
* Add option to set stencil ref in Dynamic Draw Context
* Add depth/stencil attachment slot to UI pass
* Rework mask rendering to use Atom
* Add missing circle mask image
* ensure brute force ray intersection works in the same space as kd-tree intersection
* add additional tests for ray casts against meshes using brute force approach
* update api and add some additional test cases
* comment tidy-up and other small updates/fixes for ray intersection code
* fix issue with values at the end of a ray
First version of temporal antialiasing and contrast adaptive sharpening for GA. Works well in most cases but still has a few issues that will need additional time. This is only the passes and shaders with no exposure to the editor. TAA and CAS can be turned on by enabling their respective passes in the pipeline.
All of the code has been previously reviewed in smaller PRs into the taa_staging branch:
aws-lumberyard-dev#29
aws-lumberyard-dev#53
aws-lumberyard-dev#73
aws-lumberyard-dev#79
aws-lumberyard-dev#84
Main issues:
- Bloom doesn't play nice with TAA and seems to greatly amplify any flickering
- AuxGeom jitters with the camera, so TAA doesn't currently work well in editor
- Transparencies don't have correct motion vectors. History rectification keeps this from looking too bad, but could still be improved
- There is still more that could be done to inhibit flickering, usually from specular aliasing
- Motion vectors aren't correct on POM unless PDO is turned on, which can result in some blurring during motion.
- SSAO can contribute to flickering in its default half res configuration. Changing this to full res mitigates the problem.
Squashed merge of the following:
* [ATOM-13987] Initial checkin of Taa pass.
* TAA pass setup WIP. (does not work yet due to pass configuration issues).
* Taa WIP - Camera motion vectors fixed and hooked up. TAA does simple reprojection and rejection based on depth.
* Small update to use lerp and add some comments.
* Fix issue with attachments not being set up on bindings at initialization. Fixing issue with half-pixel offsets in TAA shader
* - Motion vector passes now use the same output with mesh motion vectors overwriting camera motion vectors.
- Taa pass now works with multiple pipelines.
- Cleaned up TAA shader a bit.
* Fixes from PR review.
* Adding check for multiple attachments of the same name with different resources in Pass::ImportAttachments().
* Adding camera jitter with configurable position count. Updated TAA to blend in tonemapped space.
* Fixes from PR review. Fixing camera motion vectors for background (infinite distance)
* Updates to taa shader from PR review
* Adding a rcp input color size.
* Fix comment on PassAttachment::Update()
* Updates for PR review.
* Fixing missing const on the FrameAttachment* in Pass's call to FindAttachment()
* Taa WIP - Adding filtering to both the current pixel and history. Adding rectification based on variance clipping. Adding some basic anti-flickering. Removing rejection based on depth.
* Updates from PR code review. Mostly better commenting and naming.
* Adding contrast adaptive sharpening based on AMD FidelityFX CAS to help with the softness added by TAA.
* Changing to using luminance for sharpening instead of just green. Added some comments.
* Moving Taa's NaN check to a better location. Disabling TAA and sharpening in prep for check in.
* Updates from PR feedback.
* ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name
- Change the CreateCommonBuffer function to not require an unique name by default.
- Remove the code for generating unique buffer names.
- Add buffer name to BufferAsset so it can be used for device object name instead of using asset file name.
- Change RPI::Buffer to use BufferName_AssetUuid as attachment id.
When building a mesh's morph targets, the exporter has to identify the base
mesh in addition to each morph target mesh. Previously this was done by
searching the entire scene graph for nodes
* of type IBlendShapeData
* whose parent's name matches the name of the Atom model
This is problematic for a few reasons. The first is that the Atom model's
name may have been based on the optimized mesh node. When this happens,
the `OptimizedMeshSuffix` that is used in the Scene Graph node's name is
stripped off of the Atom model's name. The result is that the *unoptimized*
mesh is used as the base mesh for the blend shapes, instead of the
optimized blend shape. This of course results in disaster, since the
optimizer reorders the vertices, and the base mesh will not match the
optimized one. The second is that it is not really necessary to do the
search based on the node name at all. All of a mesh's blend shapes are
child nodes of the base IMeshData node. With this change, the base mesh
is located based on the node data pointer, and all of its child
IBlendShapeData nodes are added to the set of blend shapes to process. This
way, the Atom model's name isn't involved in the lookup.
* updates to kd-tree ray intersection
* update tests for kd-tree
* add one more test for kd-tree intersection
* updates to ModelKdTree following review feedback
* improve api doc comment for RayIntersection in ModelKdTree
* updates following review feedback
* update .clang-format to stack parameters if they do not all fit on one line