Commit Graph

200 Commits

Author SHA1 Message Date
antonmic 242a10dd10 addressed PR feedback 2021-05-17 23:57:01 -07:00
mriegger bcea9f29a8 Improved variable name 2021-05-12 22:11:49 -07:00
Chris Santora 37a1b77d50 Merge branch 'main' into Atom/santorac/NewLayeringWorkflow 2021-05-12 17:45:28 -07:00
antonmic b52388f5eb Remove unused file 2021-05-12 11:11:45 -07:00
antonmic 92b7099d78 Some clean up 2021-05-12 11:10:13 -07:00
Chris Santora 9faf35b529 Refactor in prepration for ATOM-14688 "Disable Individual Layers"
Refactored StandardMultilayerPBR to collate all the code for each layer into a couple structs and utility functions. This makes the code easier to maintain, and in particular will make it easy for me to add Enable flags for the layers in a subsequent commit.
Also removed subsurface scattering and translucency from StandardMultilayerPBR, according to ATOM-4120 "Stabilize Standard PBR Regarding Subsurface and Translucency".

Squashed commit of the following:

commit a6052d6ad4f70183d0ce72e84c7dc5512dc24d5e
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 11 16:32:15 2021 -0700

    Got the refactor finally working. I had change it to blend the baseColor, spec factor, and metalness before converting to albedo and spec, in order to get exactly the same results as before.

commit 42d6da7f405097dea07b6ed0426d6a662b61440d
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 11 15:58:38 2021 -0700

    Fixed clear coat issue due to LightingData initialized too late.

commit 358194a5caf6f9eb99b0e5345ad5f7768b244a93
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 11 15:18:30 2021 -0700

    Fixed a couple issues.

commit adb431f8113b945057959db288a7ee2dd825dd69
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 11 12:42:12 2021 -0700

    WIP refactor of StandardMultilayerPBR to collate the code for each layer. Also removed subsurface scattering from multilayer.
2021-05-11 17:09:41 -07:00
AMZN-mnaumov d469572422 Merge pull request #681 from aws-lumberyard-dev/Atom/mnaumov/ATOM-14320
[ATOM-14320] Fixing parallax artifacts
2021-05-11 14:31:50 -07:00
mnaumov c41ee23ea4 PR feedback 2021-05-11 12:40:37 -07:00
antonmic 8e4d0d73dc Good working state, but material always emmits low end draw item 2021-05-11 01:29:53 -07:00
Terry Michaels 8ddfcabae7 Removed unneeded comments (#673) 2021-05-10 22:02:30 -05:00
mnaumov 43f87d1541 another attempt fixing the artifacts 2021-05-10 17:58:12 -07:00
mrieggeramzn d7c72a249c Merge pull request #395 from aws-lumberyard-dev/Atom/mriegger/PLS
Atom/mriegger/pls
2021-05-10 17:13:39 -07:00
mnaumov 63b3dbefa8 Fixing parallax artifacts 2021-05-10 14:24:45 -07:00
antonmic 1a59f8c54b Merge branch 'main' into Atom/antonmic/lowEnd 2021-05-09 23:09:54 -07:00
antonmic 1f3d0beb38 work in progress 2021-05-07 18:51:20 -07:00
Chris Santora 778594a357 Merge branch 'main' into Atom/santorac/PomHeightOffset-ATOM-14495 2021-05-06 13:53:58 -07:00
Chris Santora 7443599e25 Merge branch 'main' into Atom/santorac/PomHeightOffset-ATOM-14495
Conflicts:
Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR_DepthPass_WithPS.azsl
Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR_ForwardPass.azsl
Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR_ForwardPass.azsl
Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_DepthPass_WithPS.azsl
Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl
2021-05-05 00:46:42 -07:00
Michael Riegger 19e28b18a0 Merge branch 'main' into Atom/mriegger/PLS 2021-05-04 17:15:41 -07:00
Chris Santora 88b524d868 ATOM-14495 "POM Height Bias" (continued)
Added Height Offset support to StandardMultilayerPBR.materialtype.

In order to make this work, I updated the GetDepth callback function to support the option of returning absolute depth values rather than relative depth values. Although I could have done transformations inside the GetDepth function, having this as absolute cleans things up a lot. StandardMultilayerPBR_Parallax.lua functor code now populates the MaterialSRG with displacement min/max values, instead of having to normalize the depth factors for each layer. I think this is easier to understand and work with.

Added Height Offset to each layer of StandardMultilayerPBR.
Updated the naming and description for the parallax factor in each layer, to match the other material types.
I removed the global "factor" material property because it doesn't seem applicable anymore since we have per-layer height offset. We can always add some form of this later if customers ask for it.

Squashed commit of the following:

commit 8df460800ff7058f9fbb01f995efdd5ab53d3d2c
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 4 13:35:27 2021 -0700

    Found a workaround for the DXC compiler bug

commit 5d81617285eb42bb7b48eb060234d2cb89249e34
Author: Chris Santora <santorac@amazon.com>
Date:   Tue May 4 12:27:22 2021 -0700

    Local WIP changes to get a DepthResult struct set up for the GetDepth functions.
2021-05-04 16:00:06 -07:00
Michael Riegger c51e90d224 Fix unused variable 2021-05-04 12:12:27 -07:00
dmcdiar 009ecbc152 Relocated RayTracingSceneSrg and converted to .azsli 2021-05-01 15:53:24 -07:00
Michael Riegger cff730b4b8 Merge branch 'main' into Atom/mriegger/PLS 2021-04-30 11:46:08 -07:00
Chris Santora d1801bbe47 ATOM-14495 POM Height Bias
Added parallax "Height Offset" properties to StandardPBR and EnhancedPBR.

- Refactored depth pass and shadow pass shaders to use the GetParallaxInput utility.
- Updated EnhancedPBR.materialtype to match the parallax controls and functors of StandardPBR.materialtype.
- Updated EnhancedPBR's shadow pass shader to apply a ShadowMapDepthBias because I noticed StandardPBR is doing this, so I made them match.
- Updated StandardPBR and EnhancedPBR to both use the depth offset property, as well as heightmap clipping debug view.
- Note that depth offset is not supported in StandardMultilayerPBR yet, it's hard-coded to 0 for now.
- Note that I plan to rename a lot of the "depth" terms to "heightmap" or "displacement" in an upcoming commit.
2021-04-30 00:39:48 -07:00
Michael Riegger 59077f068c bit shifts instead of if else also comments 2021-04-28 18:09:37 -07:00
Michael Riegger 815c02fb57 better var names 2021-04-28 17:45:17 -07:00
Michael Riegger 37fd8d43ed Tabs to space and better naming and comments 2021-04-28 10:40:31 -07:00
Michael Riegger c729c72034 Switching to XYZ instead of ZYX 2021-04-28 09:35:56 -07:00
Michael Riegger bbae3b6d48 Slight improvements 2021-04-26 16:16:05 -07:00
Michael Riegger 569c831532 Working PLS 2021-04-26 14:53:31 -07:00
antonmic ddd26c3321 addressed review feedback and resolved issues from merge with main 2021-04-25 23:22:02 -07:00
antonmic fb369541cb Changing specularF0 variables back to specularF0Factor 2021-04-24 11:27:13 -07:00
antonmic 7ed49cb20b Merging main 2021-04-24 11:14:49 -07:00
dmcdiar 10a8780e6f Merge branch 'main' into Atom/dmcdiar/ATOM-14951
# Conflicts:
#	Gems/Atom/Feature/Common/Assets/Passes/OpaqueParent.pass
#	Gems/Atom/Feature/Common/Assets/Passes/ReflectionGlobalFullscreen.pass
#	Gems/Atom/Feature/Common/Assets/Passes/Reflections.pass
#	Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/ForwardPassOutput.azsli
#	Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionGlobalFullscreen.azsl
2021-04-22 21:49:21 -07:00
Chris Santora 8fe1505d1d Fixed up issues with my prior occlusion changes, after merging latest main, got everything working again.
ATOM-14040 Add Support for Cavity Maps
2021-04-21 00:32:41 -07:00
Chris Santora 33745fdad1 Merge branch 'main' into Atom/santorac/CavityMaps-ATOM-14040
Note there were significant conflicts in LightingModel.azsli and StandardPBR_ForwardPass.azsl. I only did basic resolves of these conflicts, mostly preserving the changes from main and distarding the changes in the local branch. The shaders are not compiling at this point, and of course the tests are not passing. I will fix up the code to make corrections in a separate commit, to make it easier to review those changes separate from this merge.
2021-04-20 16:59:27 -07:00
Chris Santora 64e625a79f Added support for cavity maps by changing the "Ambient Occlusion" material property group go just "Occlusion", which now contains properties for both "Diffuse AO" and "Specular Cavity".
Added new input attachment to the fullscreen reflection pass to receive the "ambient" gbuffer.
Added diffuse and specular occlusion to the Skin material type; it was missing before.

ATOM-14040 Add Support for Cavity Maps

Testing:
AtomSampleViewer automation, with updates that will be submitted in that repo.
Manual testing in Material Editor.
Built all AtomTest assets and opened a few test levels, with updates that will be submitted in that repo.
Made local copies of the occlusion test materials and changed replaced the material types with EnhancedPBR and Skin, and got identical results (with clear coat disabled since it works different in EnhancedPBR and is absent in Skin).
2021-04-20 12:52:56 -07:00
Chris Santora f5cb6f438b Making room for specular cavity occlusion support in the buffer. We can pre-multiply the diffuseAmbientOcclusion into the albedo term output from the forward pass, instead of multiplying it in the diffuse GI passes. The difference due to precision is negligable. This can be seen in the corresponding changes in AtomSampleViewer baseline screenshots.
ATOM-14040 Add Support for Cavity Maps
2021-04-20 00:12:53 -07:00
antonmic 57b68302ae Deleting obsolete LightingModel.azsli 2021-04-19 22:48:34 -07:00
antonmic 7c099ed11c Updated AutoBrick and MinimalPBR 2021-04-19 21:00:13 -07:00
dmcdiar a4fe1bc8db Removed ClearCoatNormal RT from the pipeline and shaders.
Changed stencil bits to use 0x3 for the IBL Specular pass and 0x80 for the DiffuseGI pass.
2021-04-18 23:07:29 -07:00
antonmic b6c4c07fc5 New forward subsurface pass 2021-04-18 03:09:20 -07:00
antonmic 0d412abe52 Updated Skin shader 2021-04-17 12:37:25 -07:00
antonmic d0760009b0 Updated MultilayerPBR 2021-04-17 10:28:27 -07:00
antonmic aa06908024 Updated EnhancedPBR and touched up some includes 2021-04-17 09:52:04 -07:00
alexpete 8469c9ca0a Integrating github/staging through commit 5f214be 2021-04-13 17:18:57 -07:00
alexpete c5b955d281 Integrating github/staging through commit b0dd7ed 2021-04-09 12:03:26 -07:00
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 2021-04-09 11:27:37 -07:00
alexpete c2cbd430fe Integrating up through commit 90f050496 2021-04-07 14:03:29 -07:00
alexpete 75dc720198 Integrating latest 47acbe8 2021-03-25 13:57:57 -07:00
alexpete a10351f38d Initial commit 2021-03-08 14:30:57 -08:00