Commit Graph

103 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 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
Santora 00062430a2 Updated the usage of ShaderReloadDebugTracker to include the address of the object. This is necessary for debugging where multiple assets may be reloading at the same time. Also added a Printf function for generic messages at the current indent level.
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
2021-06-12 11:57:03 -07:00
Anton Michels 28d4c259c1 Fixing pass binding issue
Fixing pass binding issue that breaks certain ASV screenshot tests. Should also fix a crash on mac that was reported.
2021-06-11 13:10:13 -07:00
michabr 6584e1290b Reenable LyShine mask support now using Atom (#1218)
* 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
2021-06-11 10:03:06 -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
antonmic ef87ce094a Fixing pass binding issue that breaks certain ASV screenshot tests. Should also fix a crash on mac that was reported. 2021-06-11 00:52:24 -07:00
antonmic 9d53073546 Merge branch 'main' into Atom/antonmic/PassChanges 2021-06-10 14:34:18 -07:00
antonmic 2a982fa4b2 Pass changes: Addressing PR feedback 2021-06-10 12:50:38 -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
Tom Hulton-Harrop dd95d2b02e ensure brute force ray intersection works (#1170)
* 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
2021-06-08 19:44:33 +01:00
Benjamin Jillich 863aac2cb9 [LYN-3727] Actor Draw Bounds Draw Bounds & [LYN-3725] Actor Draw Skeleton Doesn't Draw Skeleton (#1168)
* [LYN-3727] Actor Draw Bounds Draw Bounds & [LYN-3725] Actor Draw Skeleton Doesn't Draw Skeleton

* Added skeleton, aabb and emfx debug drawing to the actor component.
* Aux geom rendering is flickering as also reported in the Discord channels. Trick with using the scene notification bus did not work as the actor instance is not bound to a given scene as far as I am aware.
2021-06-08 08:41:58 +02:00
antonmic 451de8e782 Merge branch 'main' into Atom/antonmic/PassChanges 2021-06-07 08:41:31 -07:00
antonmic 9d7119a7f8 Pass Changes WIP: fixed bloom pass 2021-06-06 21:51:49 -07:00
antonmic ed759612dd Atom Pass changes WIP: ASV screenshot tests passing now 2021-06-05 19:12:45 -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
antonmic 52b306eb3e Pass changes now building and working 2021-06-04 14:59:27 -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 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 69e2d6bba1 Minor comment update 2021-06-02 19:44:55 -07:00
Doug McDiarmid d63edf9b84 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-06-02 19:09:48 -07:00
Qing Tao 7631cdc11e ATOM-15659 Add changing StencilState support to DynamicDrawContext (#1009) 2021-06-02 14:06:04 -07:00
Tom Hulton-Harrop 4a5b7edbfe Updates to kd-tree ray intersection - ATOM-15673 (#1026)
* 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
2021-06-02 09:20:45 +01:00
Doug McDiarmid 35d7ee5e53 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-06-02 00:10:55 -07:00
Doug McDiarmid 982c30eefd Added a visibility result flag to RPI::Cullable, set to true if the object passed all culling tests. 2021-06-01 23:43:27 -07:00
Doug McDiarmid a9a42a5405 Added AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED 2021-06-01 12:17:48 -07:00
Chris Santora e690c0e626 Merge pull request #1046 from aws-lumberyard-dev/Atom/santorac/MaterialLayoutCleanup-ATOM-14002
Updated Material Property Layouts Per Design

- Renamed "Details" group to "Overview".
- Renamed "UV Names" group to "UV Sets".
- Renamed "General" group to "General Settings".
- Renamed "Parallax" group to "Displacement".
- Renamed "Texture Map" properties to just "Texture". In cases where a specific type of texture is mentioned like "roughness texture map" I called this "roughness map" (which is more common according to google).
- Renamed "Heightmap" to "Height map" (which is more common according to google).
- Reordered material property groups according to design review.
  - Base Color
  - Metallic
  - Roughness
  - Specular Reflectance F0
  - Normal
  - Occlusion
  - Emissive
  - Subsurface
  - Clear Coat
  - Displacement
  - Opacity
  - UVs
  - Irradiance
  - General Settings

ATOM-14002 [Material Editor] Revisit user facing organization and layout of material types
2021-05-28 16:55:35 -07:00
Doug McDiarmid 1b235e0b16 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-05-28 13:43:26 -07:00
Chris Santora de4e6957e8 Made a bunch of display name and description updates to core material types.
- Renamed "Details" group to "Overview".
- Renamed "UV Names" group to "UV Sets".
- Renamed "General" group to "General Settings".
- Renamed "Parallax" group to "Displacement".
- Renamed "Texture Map" properties to just "Texture". In cases where a specific type of texture is mentioned like "roughness texture map" I called this "roughness map" (which is more common according to google).
- Renamed "Heightmap" to "Height map" (which is more common according to google).

ATOM-14002 [Material Editor] Revisit user facing organization and layout of material types
2021-05-28 13:38:56 -07:00
Doug McDiarmid c84882869b Changed to a fixed-size occlusion buffer 2021-05-28 03:41:44 -07:00
Doug McDiarmid c0c9e5e90d Merge branch 'main' into Atom/dmcdiar/ATOM-15555 2021-05-27 19:24:16 -07:00
Doug McDiarmid 1d3322f881 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 2021-05-27 01:25:38 -07:00
Doug McDiarmid 8223f241b5 Merge branch 'main' into Atom/dmcdiar/ATOM-15555
# Conflicts:
#	Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp
#	Gems/Atom/Feature/Common/Code/Source/RayTracing/RayTracingFeatureProcessor.cpp
2021-05-26 21:57:43 -07:00
Chris Santora 755d1b7abc Merge remote-tracking branch 'upstream/main' into Atom/santorac/MaterialTypeCleanup 2021-05-26 21:39:28 -07:00
Chris Santora 7e023c3676 ATOM-15133 "Clean Up EnhancedPBR"
Updated material type files for StandardPBR, EnhancedPBR, and Skin to align with each other as much as possible.
There were minor cases like some property settings were different, properties in different order, comments, and formatting.
There were major cases as well, like EnhancedPBR using clunky built in functors where lua functors would be better, property visibility state wasn't right, properties were missing, etc.

I also added a new HasShaderWithTag function for lua functors. This is used in StandardPBR_ShaderEnable.lua to allow this script to be used for both StandardPBR and EnhancedPBR (EnhancedPBR doesn't have the low end pipeline shaders).
2021-05-26 20:23:31 -07:00
Doug McDiarmid 17e9c17f31 Added Occlusion Culling Planes and RPI Culling support for Masked Occlusion Culling 2021-05-26 19:18:18 -07:00
Nicholas Van Sickle d1863c6c5b Restore Editor viewport icon rendering (#879)
This introduces an EditorViewportIconDisplayInterface that will eventually be used to outright remove CIconManager, it provides a simple interface for loading 2D image assets and rendering them on-screen. It also introduces AtomBridge::PerViewportDynamicDraw for getting a dynamic draw instance on a per-viewport basis
2021-05-26 16:36:54 -07:00
jiaweig 50085d0487 Merge pull request #823 from aws-lumberyard-dev/Atom/jiaweig/ATOM-15125_UV_Tangent
ATOM-15125 Support Reorder of Tangent Streams
2021-05-26 11:25:13 -07:00
Doug McDiarmid 9f8948556f Merge branch 'main' into Atom/dmcdiar/ATOM-15555 2021-05-26 00:03:31 -07:00
jiaweig f64bd999e0 Move UvStreamTangentBitmask to new files. 2021-05-25 18:47:04 -07:00
Doug McDiarmid c29c1825cb Added RayTracingPass and RayTracingPassData 2021-05-24 01:19:37 -07:00