Commit Graph

466 Commits (4721ef829835e1d15e413c41cc410ccfa5200ed8)

Author SHA1 Message Date
galibzon 6763e2a3ac
Shaders changes require two or more change cycles before updating (#5142)
* 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>
4 years ago
Guthrie Adams 7ba7928559 Removing redundant registration of script assets
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 5de24437ab fixed comment
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams 1f4967b168 extending conversions from script to other numeric types
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
Guthrie Adams b71e307de5 Fix issue setting enum values on material component from script
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>
4 years ago
Qing Tao 9e0756f3c1
ATOM-16656 PassTree tool: ParentPass image attachment preview doesn't work (#5032)
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>
4 years ago
hershey5045 e22235ec5b
Add OpenImageIO as runtime dependency in AtomLyIntegration. (#4987)
* Add OpenImageIO as runtime dependency in AtomLyIntegration.

Signed-off-by: rbarrand <rbarrand@amazon.com>

* Place 3rdparty import inside if block.

Signed-off-by: rbarrand <rbarrand@amazon.com>

* Add platform cmake files for other platforms to prevent compile errors.

Signed-off-by: rbarrand <rbarrand@amazon.com>

Co-authored-by: rbarrand <rbarrand@amazon.com>
4 years ago
Qing Tao a5694a5ac6
ATOM-16489 Add find passes functions for Scene or RenderPipeline in PassSystemInterface (#4739) (#4963)
* 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)
4 years ago
santorac cef1e200f6 Merge remote-tracking branch 'upstream/development' into Atom/santorac/MaterialPropertyRenameInMaterialComponent 4 years ago
santorac 3c331e00ff Moved the Material Component property override renaming to EditorMaterialComponent via ApplyAutomaticPropertyUpdates.
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>
4 years ago
antonmic 972a501851 merging to resolve conflicts
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
santorac 43b7bf6ba7 Merge remote-tracking branch 'upstream/development' into Atom/santorac/MaterialPropertyRenameInMaterialComponent 4 years ago
hershey5045 f962f3d816
White Balance Updates (#4887)
* 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>
4 years ago
mrieggeramzn 8c6900eb06
Atom/mriegger/normaloffsetbias (#4841)
* Adding directional light shadow bias

Signed-off-by: mrieggeramzn <mriegger@amazon.com>

* Adding normal offset bias to the directional shadow maps

Signed-off-by: mrieggeramzn <mriegger@amazon.com>

* not time yet for this

Signed-off-by: mrieggeramzn <mriegger@amazon.com>

* small comment fix

Signed-off-by: mrieggeramzn <mriegger@amazon.com>

* fixing tabs

Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
santorac c6b209ace0 Made material property auto-rename procedure apply to Material Component at runtime. This ensures that an material property overrides and any gameplay scripts that work with property overrides can get the benefit of the material type version update procedure.
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>
4 years ago
antonmic 4b7eac0b40 merging dev
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic e5c7703aa7 Addressing review feedback
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 6e7d2e6dd6 removing commented line in TAA pass
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 6642850c02 Cleaned up new Depth of Field, ready for PR
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 60148ccc39 New Depth of Field - Minor improvements, optimizations, and now works with auto focus
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
antonmic 9e8e08a815 Throwing up Depth of Field WIP so Galib can investigate AP crash with shader processing
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
4 years ago
Guthrie Adams 2e44d96b05
Merge pull request #4734 from aws-lumberyard-dev/Atom/mriegger/directionallightbias
Atom/mriegger/directionallightbias
4 years ago
AMZN-ScottR 1b1ef46d9d Merge branch 'development' into atom_cpu_profiler_gem_promotion
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
Guthrie Adams fa3f3e4285
Merge pull request #4618 from aws-lumberyard-dev/Atom/EditorColorGrading
Implement LUT Generation Pass and hook up into Editor
4 years ago
hershey5045 85183f5936 Add weights for the remaining color grading operation. Refactor editor hdr color grading property texts. (#266)
Signed-off-by: rbarrand <rbarrand@amazon.com>

Co-authored-by: rbarrand <rbarrand@amazon.com>
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
AMZN-ScottR b89e437a6b [atom_cpu_profiler_gem_promotion] migrated CPU frame data capture API and implementation from Atom over to Profiler gem
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
AMZN-ScottR 66f905870d [atom_cpu_profiler_gem_promotion] reinstated CPU frame time serialization in Atom profiling tools (relies on Atom frame time tracking)
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
AMZN-ScottR da75b7ef2b [atom_cpu_profiler_gem_promotion] disconnected Atom CPU profiler preparing for gem promotion
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
4 years ago
moudgils 693d849bd1
Vulkan fixes (#4710)
* 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>
4 years ago
rbarrand a8b6c1e77b Add cmake file for editor scripts. Add constexpr keyword to constants. Use AZ_CRC_CE for LookModificationComponent.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
mrieggeramzn a114fa5531 Merge branch 'development' into Atom/mriegger/directionallightbias
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
santorac 6e62e66269
Fixed frame capture on vulkan
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
4 years ago
mrieggeramzn 49f3393646
Removing unused softening boundary width controls (#4647)
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
santorac 1626d2d007 Minor code cleanup.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac d89b1b0aa1 Fixed frame capture on vulkan. It just wasn't passing the correct RHI Format value.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
rbarrand 67c14c21cc Remove lut identity assets and code, simply calculate base coordinates for LUT programmatically.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
rbarrand c42d82386b Refactor and resolve PR comments.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
rbarrand a3802c45b8 Fix cmakelist file for atom features.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
rbarrand 579236ecf6 Add SPDX header for python script. Update path aliases. Re-order HDRColorGradingParams.inl to order editor properties appropriately.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
rbarrand 8a8b74a6e9 Finalize shaper implementation. Refactor color grading functions.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
Robin b00ee3ff75 Implement lut resolution.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
Robin 2313f912bc Initial commit for editor LUT generation.
Signed-off-by: rbarrand <rbarrand@amazon.com>
4 years ago
Ken Pruiksma 937c2b2e88
Terrain FP supports macro material component (#4587)
* 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>
4 years ago
mrieggeramzn d7ac1be726 Adding directional light shadow bias
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
lumberyard-employee-dm 97e9f4dc7d
[LYN-6838] Various Monolithic shutdown fixes for the GameLauncher (#4564)
* 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>
4 years ago
mrieggeramzn ea030d2890 Removing unused softening boundary width controls
Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
moudgils 5cefd552a6
- Optimize SRG compilation to not update the whole SRG if not needed across all backends (#4499)
- 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>
4 years ago
Scott Romero a95c609bd8
[development] Migrate Atom CPU timing stats tracking to use global stats profiler (#4549)
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
4 years ago
Tobias Alexander Franke 091b729183
Do not run SSAO pass when disabled (#3826)
* 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>
4 years ago
Tommy Walton 9686ff034f Merge remote-tracking branch 'upstream/development' into SkinnedMeshOutputStreamManager_deferred_buffer_init
Signed-off-by: Tommy Walton <waltont@amazon.com>
4 years ago