Commit Graph

435 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 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 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
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
Yuriy Toporovskyy bf38f07480 Allow buffer to take any size, including 0
Signed-off-by: Yuriy Toporovskyy <toporovskyy.y@gmail.com>
4 years ago
galibzon 643bd84739
Create helper function for getting threads per (#4480)
* Create helper function for getting threads per
group from a compute shader

Added GetComputeShaderNumThreads() functions to RPIUtils.
By default the function returns 1, 1, 1 in case of errors.

Updated existing code that was looking for 'numthreads' attribute data
with the new GetComputeShaderNumThreads() API.

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago
Tommy Walton 256564a3e0
Model Hot-Reloading (#4304)
* Added a ModelReloader class that handles reloading the hierarchy of assets in the correct order. A ModelReloaderSystem that is used to make sure there is only one ModelReloader at a time for a given asset. Modified the Model, ModelLodAsset, and Buffer assets to not automatically reload, and instead handle reloads manually via AssetCatalog events. Modified the MeshLoader to kick off a reload via the ModelReloaderSystem whenever a model asset is added or changed.

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Comment updates

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Minor naming and comment updates based on PR feedback

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Correcting previous commit. I flipped == to != when switching from count to find, when it should have stayed ==

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Updating RenderCommon header

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Removing unneeded headers

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Reverting RayTracingFeatureProcessor change following Doug's guidance. This logic was tricky to get right initially, and leads to TDR when incorrect, so leaving as is.

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Removing a tab

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Added missing #include for AssetId

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Adding missing RTTI header

Signed-off-by: amzn-tommy <waltont@amazon.com>

* Include ModelAsset definition intead of forward declaring it to avoid a static assert on Linux

Signed-off-by: amzn-tommy <waltont@amazon.com>
4 years ago
Guthrie Adams 09c6101b8b
Merge pull request #4416 from aws-lumberyard-dev/Atom/mriegger/stopdecalflickering
Adding some code to cache the material in the editor component to avo…
4 years ago