Commit Graph

191 Commits

Author SHA1 Message Date
Doug McDiarmid 72e5ab4437 Merge branch 'development' into Atom/dmcdiar/ATOM-5702 2021-06-18 17:12:52 -07:00
Doug McDiarmid dc1d34c83f NoMSAA supervariant support
Added a ShaderSystem supervariant to provide a system-wide supervariant name.
Changed ShaderAsset to append the system-wide supervariant name when searching for supervariants.
Added the NoMSAA supervariant to several shaders.
2021-06-18 16:39:32 -07:00
AMZN-mnaumov eed5f13115 Merge pull request #1368 from aws-lumberyard-dev/Atom/mnaumov/DisplayMapperFix
Fixing "type not registered with BehaviorContext" when running ASV
2021-06-16 15:38:36 -07:00
mnaumov 2f9a055a8f Fixing "type not registered with BehaviorContext" when running ASV 2021-06-16 11:42:18 -07:00
AMZN-mnaumov c0dc0cb936 Merge pull request #1337 from aws-lumberyard-dev/mnaumov/StabilizationJun15
Stabilization to Development merge - 06/15/21
2021-06-15 15:42:04 -07:00
yuriy0 a9c55c1070 Update actor render bounding box (#991)
* Extend MeshFeatureProcessor to allow changing the mesh bbox, which requires re-compute the culling data for that mesh

* Update actor mesh bbox when EMFX actor instance bbox changes.

Also use the actor instance global bbox to compute the local bbox for the skinned render mesh, instead of the using the static bounds based bbox, as not every actor instance is going to be using the static bounds bbox.

* Store per-instance mesh AABB in the right place.

In the MeshInstanceData, which is unique per instance, instead of in the Model, which is shared between all instances.

For greater clarity, also remove Model::m_aabb and the corresponding getter and setter, as it isn't immediately obvious whether this gets the model asset bbox or the mesh instance bbox. Callers should instead be explicit about which bbox they want.

* Bug fix: model asset is not necessarily ready in AcquireMesh

* Remove now-unused forward declaration

* Update MockMeshFeatureProcessor with SetLocalAabb/GetLocalAabb
2021-06-15 13:09:30 -05:00
mnaumov 9ca0e731f4 Merge remote-tracking branch 'upstream/stabilization/2106' into mnaumov/StabilizationJun15
# Conflicts:
#	Code/CryEngine/CrySystem/LevelSystem/LevelSystem.cpp
2021-06-15 10:41:13 -07:00
Roman 1f6bb14ed3 [EMFX][ATOM] crash during mesh reload (#1301)
* Fixed a crash when entering game mode, removing a mesh and re-adding mesh.
2021-06-14 20:38:37 -07:00
dmcdiarmid-ly 567b54ee25 Merge pull request #1297 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15767
[ATOM-15767] ReflectionScreenSpaceBlurPass uses a fixed number of mips
2021-06-14 19:06:13 -07:00
Doug McDiarmid de4605d6b7 Added comment. 2021-06-14 18:31:43 -07:00
dmcdiarmid-ly b1e22db0be Merge pull request #1298 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15623
[ATOM-15623] Objects excluded from ReflectionProbe still render DirectionalLight shadows
2021-06-14 12:45:55 -07:00
Doug McDiarmid bb083fde3c Added ReflectiveCubeMap usage flag if the shadow is rendering in an EnvironmentCubeMap pipeline 2021-06-12 17:28:50 -07:00
Doug McDiarmid 886601ad94 Created a new ReflectionScreenSpaceCompositePass to set the maximum roughness mip in the pass Srg.
Changed the ReflectionScreenSpaceBlurPass to auto-generate the mip chain, which will compute the appropriate number of mips.
2021-06-12 03:20:31 -07:00
Doug McDiarmid 8459cbe5c2 Removed the DiffuseGlobalIllumination component from the editor Entity Component list, it was intended to be a Level Component only.
Checked for a valid quality level in DiffuseGlobalIlluminationFeatureProcessor::SetQualityLevel.
Initialized the quality level to Low in DiffuseGlobalIlluminationComponentConfig.
2021-06-12 01:18:24 -07:00
moudgils f2db30c5d0 Merge pull request #1246 from aws-lumberyard-dev/UpdateIosPipeline
Fix many issues on Mac metal
2021-06-11 09:42:14 -07:00
galibzon cc615a8f32 [ATOM-15472] Shader Build Pipeline: Remove Deprecated Files And Funct… (#1079)
* [ATOM-15472] Shader Build Pipeline: Remove Deprecated Files And Functions That
Predate The Shader Supervariants

These are the essential impactful changes as a result of deprecating the
ShaderResourceGroupAsset.

* Addressed feedback by @moudgils. Better comments in header files.

* More updates related with deprecation of ShaderResourceGroupAsset

* Deleted the temporary version 2 classes.

* Updated version of the shader asset builders.

* Updated version of all the shader related classes impacted
by the Supervariant concept and deprecation of ShaderResourceGroupAsset

* Changes to *.pass and DGI, Reflections and RayTracing.

* changes to material related assets

* changes to core lights

* Changes to auxgeom/dynamic draw.

* changes to decals, lyshine, imguipass

* changes to RPI Pass classes

* Shader for SceneSrg, ViewSrg and ForwardPass Srgs.

* changes to mesh, skinned mesh, Morphtarget.

* Fixes to RayTracingPass.cpp & now allow empty srg in shaders.

* Updated Atom_RPI.Tests

* Simplified InstanceDatabase by removing AddHandler

------------------------------------------------------------------------------------
* Updated DiffuseGI precompiled shaders.
Added RayTracingSceneSrg and RayTracingMaterialSrg shader asset.
Updated ShaderAssetCreator::Clone to handle the supervariant when processing root variants.
Co-authored-by: Doug McDiarmid <dmcdiar@amazon.com>
------------------------------------------------------------------------------------

* Changed semantics for some PassSrg to SRG_PerPass_WithFallback.

AuxGeom/FixedShapeProcessor.cpp requires SRG_PerDraw on ObjectSrg.

Removed names of SceneSrg and ViewSrg from RPISystemDescriptor.cpp

* Moved ShaderLib/Atom/Features/DummyEntryFunctions.azsli
To  Gems/Atom/RPI/Assets/ShaderLib/Atom/RPI/DummyEntryFunctions.azsli

Removed redundant checking for finalization in
ShaderResourceGroupLayout.cpp

* Fixed race condition bug for Shader::FindOrCreate.
InstanceDatabase<>::CreateInstance() needs to be atomic
for instance creation and initialization.

Added optional InstanceHandler::CreateFunctionWithParams to accomodate
to the needs of Instances that need more than an asset reference
to be able to be created an initialzed.

Removed ShaderResourceGroup::FindOrCreate() only ::Create is available
now.

* Renamed scene_and_view_srgs.* as SceneAndViewSrgs.*

Changed GetAzslFileOfOrigin for GetUniqueId

* Fixed unit tests.

* Reverted the serialization name of m_uniqueId back to
"m_azslFileOfOrigin" so precompiled shaders don't fail
in layout comparison.

* Fixed AtomCore.Tests
Removed non-applicable test. InstanceDatabase.AddHandler() is not
available anymore.

* The Null rhi is re-enabled for shader compilation.

Signed-off-by: garrieta <garrieta@amazon.com>
2021-06-11 07:48:23 -05:00
Anton Michels 63a612efbc Merge pull request #1215 from aws-lumberyard-dev/Atom/antonmic/PassChanges
[ATOM-15590] Pass System Improvements
2021-06-10 23:55:00 -07:00
antonmic 2a982fa4b2 Pass changes: Addressing PR feedback 2021-06-10 12:50:38 -07:00
Doug McDiarmid d94015f5e1 Skipped meshes with no materials in MeshFeatureProcessor::SetRayTracingData 2021-06-09 14:53:32 -07:00
antonmic 1ddb94ada1 Pass changes: final cleanup 2021-06-09 08:55:57 -07:00
antonmic 702356007c Pass changes WIP: standardized usage of new pass initialization functions 2021-06-08 22:36:54 -07:00
antonmic 6973d9c7a3 Pass changes WIP: moved child pass creation to Build phase 2021-06-08 12:03:58 -07:00
antonmic a30d9621d5 Pass changes WIP: various fixes, exposure sample now works 2021-06-07 23:05:36 -07:00
antonmic 451de8e782 Merge branch 'main' into Atom/antonmic/PassChanges 2021-06-07 08:41:31 -07:00
antonmic ed759612dd Atom Pass changes WIP: ASV screenshot tests passing now 2021-06-05 19:12:45 -07:00
moudgils 77b209d023 Merge branch 'main' into UpdateIosPipeline 2021-06-04 23:07:40 -07:00
Ken Pruiksma 9df995dd26 Temporal anti-aliasing and constrast adaptive sharpening (#1161)
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.
2021-06-04 20:57:44 -05:00
antonmic 1e5a35ccfe Merge branch 'main' into Atom/antonmic/PassChanges 2021-06-04 17:49:20 -07:00
dmcdiarmid-ly d19d2aff9d Merge pull request #1110 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15517
[ATOM-15517] Software Occlusion Culling
2021-06-04 15:21:39 -07:00
dmcdiarmid-ly 579f4ca9d6 Merge pull request #1138 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15718
[ATOM-15718] DiffuseProbeGrid quality level
2021-06-04 15:14:47 -07:00
antonmic 52b306eb3e Pass changes now building and working 2021-06-04 14:59:27 -07:00
AMZN-mnaumov 8fa6d5d1b0 Merge pull request #1050 from aws-lumberyard-dev/Atom/mnaumov/ATOM-15631
[ATOM-15631] First pass on exposing Display Mapper properties to Behavior Context
2021-06-04 10:30:04 -07:00
Qing Tao dcdd63966e ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name (#1133)
* 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.
2021-06-04 10:28:56 -07:00
antonmic 0f90ccc0b4 initial changes compiling 2021-06-04 09:38:28 -07:00
Doug McDiarmid fefa46dd6a Added DiffuseGlobalIlluminationFeatureProcessor and moved the DiffuseProbeGrid files to the DiffuseGlobalIllumination directory 2021-06-04 02:39:25 -07:00
Doug McDiarmid 2449a9322d Changed the occlusion culling plane model to be on the XZ plane and adjusted the corner point computations 2021-06-03 18:42:13 -07:00
Doug McDiarmid 792176d764 Cached occlusion plane corner points and AABB in the feature processor 2021-06-03 16:02:16 -07:00
Doug McDiarmid d63edf9b84 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-06-02 19:09:48 -07:00
mnaumov c3df73bed8 PR feedback and fixing TrackView 2021-06-02 18:48:50 -07:00
mnaumov 4f72e49ad4 Merge main 2021-06-02 13:40:33 -07:00
guthadam 25a114d324 updating includes 2021-06-02 11:35:40 -05:00
Doug McDiarmid 35d7ee5e53 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-06-02 00:10:55 -07:00
guthadam b37145589d Merge branch 'main' into Atom/guthadam/LYN-3871_LYN-3872_material_assignment_json_serializer_for_prefabs 2021-06-01 19:38:57 -05:00
hershey5045 9e3b7b45d9 Fix window handle retrieval in frame capture system. (#1073)
Capturing screenshots via hydra should work now.
2021-06-01 14:21:02 -07:00
moudgils 0d5247be34 Fix metal shader pipeline crashes for LuminanceHistogramGenerator and MorphTargetCS due to the use of atomic operations with typed buffers. Switching them to use Structured buffers. Plus misc cleanup 2021-06-01 09:58:45 -07:00
guthadam d115eae84a LYN-3871/3872 Added JSON serializer for MaterialAssignment property overrides 2021-06-01 11:43:05 -05:00
Doug McDiarmid 59ab6edaef Added occlusion culling plane visualization 2021-05-31 01:38:13 -07:00
Esteban Papp 50a9e94eca Fix old method call (#1049) 2021-05-28 18:28:29 -07:00
mnaumov ab45ea7efa [ATOM-15631] First pass on exposing Display Mapper properties to Behavior Context 2021-05-28 17:15:20 -07:00
hershey5045 75cb293b2a Png fix for vulkan rhi (#962)
* Add supported formats for pngs in frame capture system. Add conversion logic from bgra to rgba.
2021-05-28 16:40:44 -07:00