* Shaders changes require two or more change cycles before updating
This fixes the problem described in the title.
Consolidated the responsibility to update the root shader variant
asset into the Shader() class. It was unnecessarily spread across
Shader(), ShaderVariant() and ShaderAsset().
In particular OnAssetReloaded now makes a temporary copy of the root
ShaderVariantAsset and updates the ShaderAsset with such reference
only when OnAssetReloaded() is called on behalf of the ShaderAsset.
Signed-off-by: galibzon <66021303+galibzon@users.noreply.github.com>
Replaced get and set functions with explicit types with templates
Added special case handling for setting enum values as strings or numbers from script
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
Move imageAttachmentCopy instance from RenderPass to Pass so it can support preview image for all passes but not only for RenderPass.
Fixed an issue with image attachment preview when switching render pipeline with attachment preview on.
Signed-off-by: Qing Tao <qingtao@amazon.com>
* ATOM-16489 Add find passes functions for Scene or RenderPipeline in PassSystemInterface
Introduced new PassSystemInterface::ForEachPass() funtion to replace PassSystemInterface::FindPasses(), PassSystemInterface::GetPassesByTemplateName and ParentPass::FindPassByNameRecursive() functions.
Update all the places which were using those three functions.
The new pass finding filter support any combination of pass name, pass template name, pass class type, pass hirechary, owner scene, owner render pipeline.
Update unit tests.
Signed-off-by: Qing Tao <qingtao@amazon.com>
(cherry picked from commit fe8dac7989)
MaterialAssignment::ApplyProperties() still reports warnings but does not update the m_propertyOverrides.
MaterialAssignment::ApplyProperties() will now skip the old name'd overrides if overrides are present for the new names. I'm not sure if this will ever happen, but it did happen while I had some intermediate changes, so I imagine it could happen again.
I had to update the Material::FindPropertyIndex function to expose information about renames when they occur. This should make it easier for other systems to get (somewhat) automatic benefit from the version update feature.
I also found that there was an issue with material inspector where it wouldn't be initialized the the right override values when renames were present. Now it applies the renames to whatever override data it gets from the Material Component.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
* Implement simple tint for white balance color grading. Adjust temperature slider to feel linear.
Signed-off-by: rbarrand <rbarrand@amazon.com>
* Change white balance luminance preservation equation and remove unused code.
Signed-off-by: rbarrand <rbarrand@amazon.com>
Co-authored-by: rbarrand <rbarrand@amazon.com>
I added an ApplyPropertyRenames function to MaterialTypeAsset very similar to the one in MaterialTypeSourceData.
Updated the MaterialAssignment class to apply any property renames when it discovers the old name doesn't work. This will be written to disk when the level or prefab is saved.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
* Disable partial Descriptor Set updates as Vk validation layer does not like that
Signed-off-by: moudgils <moudgils@amazon.com>
* Enable parallel encoding for Vulkan
Disable partial SRG updates for Vk as the validation layer did not like that. There is a way to just updat SRG constants but that will require more work
Fix a bunch of Vulkan validation errors (mostly the ones spammming each frame)
Signed-off-by: moudgils <moudgils@amazon.com>
* Minor feedback update
Signed-off-by: moudgils <moudgils@amazon.com>
Atom Sample Viewer screenshot tests were failing because they couldn't be saved. The code was passing the previous RHI Format instead of the updated one.
Vulkan screenshot tests are operational again. ASV material screenshot test script passes on vulkan and dx12 now (other than known issues).
Merge pull request #4719 from aws-lumberyard-dev/Atom/santorac/FixVulkanPngCapture
* Adding basic support for TerrainMacroMaterialNotificationBus. Tracking macro materials in list.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit b4773454334de940d730620ffff300b46d6c611d)
* Adding bus connection
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit 66c99f503adb24f4be4f81716b544202d8e237d9)
* Additions to indexed data vector to allow for getting an index from the data or deleting data with a reference to the data itself instead of the index.
Additions to the feature processor for tracking macro material indices in sectors.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit 06365dbde5454e18e5fdf941f03b17b0d632027c)
* Macro materials updating which macro materials are used in which sectors. Correctly handling construction / destruction.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updating the terrain macro material type to have the correct properties and also not attempt to render. Refactored some of the update loop in the TerrainFP to only rebuild the sectors when necessary, otherwise just update the srgs.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixed up macro material to not try to actually render anything with shaders or hook to any shader data
Terrain FP now pulls data pulling from macro material instance to use in the terrain material
Various bug fixes around when terrain sectors needed reprocessing
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding basic support for TerrainMacroMaterialNotificationBus. Tracking macro materials in list.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit b4773454334de940d730620ffff300b46d6c611d)
* Adding bus connection
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit 66c99f503adb24f4be4f81716b544202d8e237d9)
* Additions to indexed data vector to allow for getting an index from the data or deleting data with a reference to the data itself instead of the index.
Additions to the feature processor for tracking macro material indices in sectors.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
(cherry picked from commit 06365dbde5454e18e5fdf941f03b17b0d632027c)
* Macro materials updating which macro materials are used in which sectors. Correctly handling construction / destruction.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updating the terrain macro material type to have the correct properties and also not attempt to render. Refactored some of the update loop in the TerrainFP to only rebuild the sectors when necessary, otherwise just update the srgs.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Fixed up macro material to not try to actually render anything with shaders or hook to any shader data
Terrain FP now pulls data pulling from macro material instance to use in the terrain material
Various bug fixes around when terrain sectors needed reprocessing
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Constify all the things
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updates from PR review.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Added a stateless allocator which uses AZ_OS_MALLOC/AZ_OS_FREE to
allocate memory for objects in static memory.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the Maestro and LyShine Anim Nodes to use the
stateless_allocator for its static containers.
This prevents crashes in static de-init due to the SystemAllocator being
destroyed at that poitn
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the EBus AllocatorType to use the EBusEnvironmentAllocator
Because the EBus Context resides in static memory, the SystemAllocator
lifetime is shorter than the EBus Context.
This results in shutdown crashes in monolithic builds due to all of the
gem modules being linked in as static libraries and the EBus context now
destructing at the point of the executable static de-init, instead of
the module de-init, where the SystemAllocator would still be around.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed an assortment of shutdown issues due to deleting objects after
AZ allocators are no longer available
Fixed the NameDictionary IsReady() function to not assert when the
dictionary when invoked after the environment variable it was stored in
was destroyed.
Updated the NameData destructor to check that the NameDictionary
IsReady() before attempting to remove itself from the dictionary
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Fixed NameDictionary destory workflow, to reset the EnvironmentVariable
instance
Updated the EnvironmentVariable instance to store the NameDictionary as a
value.
Added a rvalue reference `Set` function overload to the
EnvironmentVariable class to support move only types.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Clang 6.0.0 build fixes
The C++17 std::launder feature isn't available in that compiler version
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
- Each resource type is tracked and updated separately
- Added caching ability for Raytracing srg to save ~2ms for a scene containing 100 x 50 vegetation patch
Signed-off-by: moudgils <moudgils@amazon.com>
This change is a preparation for moving the CPU profiler/visualization system from Atom into its own Gem by removing the dependency on local time tracking object AZ::RHI::CpuTimingStatistics
Full changes include:
- Removed all usage of AZ::RHI::CpuTimingStatistics
-- Replaced with pushing to AZ::Statistics::StatisticalProfilerProxy global instance
- Promoted VariableTimer from AZ::RHI to AZ::Debug
- Removed now unused CpuTimingStatistics.h
Signed-off-by: AMZN-ScottR 24445312+AMZN-ScottR@users.noreply.github.com
* Define fallback slots when shader is disabled
* Disable SSAO parent pass depending on the settings
* Move SSAO modulation pass into SsaoParent pass so it can be disabled with the rest of SSAO
* Enable SSAO by default
Co-authored-by: Tobias Alexander Franke <tobias.alexander.franke@huawei.com>