Made sure the depth and shadow shaders enable parallax calculations when alpha clipping is enabled (instead of only when parallax POM is enabled).
Moved the alpha calculations to be *after* the parallax calculations.
Factored out ShouldHandleParallax() and ShouldHandleParallaxInDepthShaders() utility functions, which help us ensure consistent application of parallax calculations across the various shaders in each material type.
Removed some dead code in a couple shaders where dirToCamera was calculated but not used.
Also did ATOM-15034 "Remove Opacity From Multi-Layer Material Types For Now" rather than addressing whatever additional alpha cutout issues might be present on multilayer materials.
Testing:
AtomSampleViewer full test suite.
Added a new AtomSampleViewer screenshot test for alpha clipping with parallax (separate repo).
Addional testing of relevant properties in Matirial Editor.
Tested updated StandardMultilayerPBR in Editor.exe where I had shadows and clipping against other geometry.
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.
-Fix vulkan graphics pipeline creation failure having depth clamp off with devices not supporting depth clip.
-Added reason for the mobile version of screen space reflection
- Fixing cloth working with Actors by reading directly from ModelAsset instead from EMFX Mesh.
- Actor caches map from joint indices in skin metadata to skeleton indices so they can be query later.
- Actor cloth skinning reads indices and weights from Model Asset instead from EMFX Mesh.
- Actor cloth skinning with unlimited skinning bones.
- Sort out cloth unit tests by disabling them until there is a way to create an Atom mesh
- Addressing feedback.
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.
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).