Commit Graph

127 Commits (1431afb51a08535a0ceabc22f11a55c0e5f5bb93)

Author SHA1 Message Date
rgba16f 67689d48cc
Add precise keyword to the depth and forward pass shaders. (#6536)
* Add precise keyword to the depth and forward pass shaders. Make sure metal shader pipeline passes the invariant along

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Update with VickyAtAZ's feedback, split the preserve invariance into a separate string

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>

* Fix attribute comment alignment in the shaders

Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
4 years ago
tjmgd 7cce6dde41
Hide the invalid parameters in the EnhancedPBR in the Material Editor (#6298)
* Hide the invalid parameters in the EnhancedPBR in the Material Editor

Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>

* Fixed headers

Signed-off-by: T.J. McGrath-Daly <tj.mcgrath.daly@huawei.com>
4 years ago
benblack75 9698047340
Modified Color Swatch Fix (#6137)
* Modified Color Swatch Fix

Signed-off-by: Benjamin Black <benblac@amazon.com>

* Updating Macbeth Colors to work with new material formatting

Signed-off-by: Benjamin Black <benblac@amazon.com>

* Tweaks to red color values

Signed-off-by: Benjamin Black <benblac@amazon.com>

* Tweaked red swatch color values provided by Ken

Signed-off-by: Benjamin Black <benblac@amazon.com>
4 years ago
SWMasterson 0116f0a520
Adding Macbeth level to AutomatedTesting and converting to Prefab (#6060)
* Adding macbeth level to AutomatedTesting

Signed-off-by: Sean Masterson <semaster@amazon.com>

* removing unnecessary files

Signed-off-by: Sean Masterson <semaster@amazon.com>
4 years ago
galibzon 621194e593
StandardMultilayerPBR_ForwardPass.azsl. the type of input.m_normal is (#5385)
float

Github issue: https://github.com/o3de/o3de/issues/2522

Change to float3. The current ASV tests are not affected but
using the RPI/Mesh example with Mesh: objects/suzanne.azmodel
and the material:
StandardMultilayerPbrTestCases/005_UseDisplacement.material

Showed a clear improvement.

Signed-off-by: galibzon <66021303+galibzon@users.noreply.github.com>
4 years ago
Adi Bar-Lev bd6153f471 Material - enbale/disable metallic scale according to texture selection
Remark: resolves GitHub issue https://github.com/o3de/o3de/issues/2647 - ATOM-15614

Signed-off-by: Adi Bar-Lev <82479970+Adi-Amazon@users.noreply.github.com>
4 years ago
santorac 8fd3461863 Removed reference to opacity.doubleSided property that no longer exists.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac 59da09c68b Now that we have material version auto update support, I remove the old opacity.doubleSided property and added a rename versionUpdate step to rename it to general.doubleSided.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac c05b900b55 Merge branch 'development' into Atom/santorac/MoveDoubleSided 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
galibzon 63140dc247
Atom/galibzon/atom 4608/inline to root constant (#4897)
* Changed references to "InlineConstant" to "RootConstant".

Updated AZSLC to version 1.7.34  for mac,  linux & windows

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago
santorac b32a6a1369 Reverted accidental change to StandardPBR.material type's color property name.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac f83b6594c9 Updated MaterialTypeSourceData to force users to move the "version" indicator to the new location at the top level of the json document.
(It's a simple enough change to make manually, and making .materialtype is an uncommon workflow, so not worth doing this automatically).

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
Tommy Walton 2dd00e2983
Move wrinkle mask data out of default object srg (#4578)
* Refactored depth, shadow, and motion vector shaders to support custom object srgs. Added a new skin object srg and moved wrinklemask data out of the default object srg. Added a new minimal morph target asset for testing wrinkle masks to AutomatedTesting.

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Fix copyright header

Signed-off-by: Tommy Walton <waltont@amazon.com>
4 years ago
mrieggeramzn c38c9739da
Adding vertexNormal to the Surface structure and using it for shadows (#4617)
* Adding vertex shadow and using it for all shadows
* Fixing small issue with it not being initialized
* Adis recommendations for hair

Signed-off-by: mrieggeramzn <mriegger@amazon.com>
4 years ago
santorac 3753ee6f1c Merge remote-tracking branch 'upstream/development' into Atom/santorac/RemixableMaterialTypes 4 years ago
santorac f92daf060b Working on exposing the doubles-sided flag outside the Opacity property group.
Before, the only way to set the double-sided flag was to enable a non-opaque mode, because the flag was hidden. We are moving the double-sided flag to the general property group instead of the opacity property group, so it is always available. In this particular commit, we just add the general.doubleSided property so we don't break existing data. In an upcoming commit I will remove opacity.doubleSided, once we have the material backward compatibility system ready.

I also added another "default" texture map to the Common/Feature gem that is directional, so better for understanding UV/tangent space. These were copied from the AtomLyIntegration gem. This is being used for a screenshot test in AtomSampleViewer with the new 009_Opacity_Opaque_DoubleSided.material.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
amzn-tommy ed61f47b7f Cleaner initialization of heightMinMax plus a comment in StandardMultilayerPBR_Common.azsli to indicate that the .lua needs to be updated if the .azsli enum changes.
Signed-off-by: amzn-tommy <waltont@amazon.com>
4 years ago
amzn-tommy d15d7c3a85 Modify CalcOverallHeightRange to not return nil
Signed-off-by: amzn-tommy <waltont@amazon.com>
4 years ago
santorac 71c7fc0217 Updated unit tests to work with the new convention for property name vs property ID.
This revealed that the approach of reflecting both the old "id" and the new "name" would not work, because whenn saving it would write out both fields. So I decied to just give up on backward compatibility. This will be much cleaner than trying to continue supporting "id" as a field name, it is uncommon for users to make their own material types at this point, and if they have made some it is very easy to search and replace "id" with "name" update their files.

All .materialtype files have been updated. RPI unit tests now pass. ASV still passes.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
santorac c2abd2d74f Updated the naming convention for material property "names" vs "IDs".
A "property name" is the name of the just the property without regard to the group that it's in. A "group name" is the name of the group. And a "property ID" is the full unique name of a property in the form "groupName.propertyName". This is important preparation for upcoming changes where property sets can contain other property sets, and property IDs can be arbitrarily long like "layer1.baseColor.factor" for example.

The naming changes include variables, some code comments, and the .materialtype file format. I was able to make these changes in a backward compatible way so a property or group "id" field has been replaced with a "name" field, but "id" is still supported for compatibility. StandardPBR, EnhancedPBR, StandardMultilayerPBR, and Skin have all been updated. Note that MinimalPBR has not been updated, proving that backward compatibility works. (We can update this one too at some point though).

Testing:
Opened up materials in the material editor.
Ran AtomSampleViewer in dx12 and vulkan with no new failures.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
galibzon 4cac875589
[ATOM-15058] Remove Automatic Entry Point Detection (#3150)
.shader files must declare at least  one entry function.

Signed-off-by: garrieta <garrieta@amazon.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Ken Pruiksma 1f77afae6e
Fixing alpha affects specular showing up when the alpha mode is opaque or cut-out. It should only be available when mode is blended or tinted transparent. (#1830)
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
5 years ago
antonmic 832a1c36a4
Merge pull request #1756 from aws-lumberyard-dev/2016/antonmic/subsurfaceVulkan
[ATOM-15876] fixed subsurface scattering on vulkan
5 years ago
antonmic 19638c4697 [ATOM-15876] fixed subsurface scattering on vulkan
Signed-off-by: antonmic <56370189+antonmic@users.noreply.github.com>
5 years ago
Ken Pruiksma 6a0b8ae6b6
[ATOM-15854] Adjusting alpha on grazing angles so it doesn't affect the diffuse response. (#1708)
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
5 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Ken Pruiksma 1ee4f7b447
Adjusting alpha on grazing angles so it doesn't affect the diffuse response. (#1599) 5 years ago
Ken Pruiksma ac13551dc0
Cherry picking a034500a10 [a034500] (#1580)
Adding a factor for alpha affecting specular in the standard and enhanced pbr materials (#1474)

* Adding a factor for how much alpha should affect specular to standard and enhanced pbr. Currently blended and tinted transparency always assume that the geometry represents the surface, and the surface may just be transparent like glass. In this model, specular is unnaffected by alpha - perfectly clear glass still reflects light and obeys the Fresnel factor. However alpha may also represent the absence of a surface entirely for mateirals where cut-out alpha is a bad fit because of subpixel detail, like hair or cob webs. This change addresses that by allowing the alpha to also affect specular reflection if desired.

* Adding material for ASV test.
5 years ago
mrieggeramzn b4641b0b5d
Merge pull request #1558 from aws-lumberyard-dev/banding
Adjust Pdo shadow map bias
5 years ago
mriegger 648a7d85cc Adjust Pdo shadow map bias 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
Ken Pruiksma 570696ad76
[ATOM-14344][ATOM-13908] Merging skinned and static mesh motion shaders using an optional vertex stream (#1491)
[ATOM-14344][ATOM-13908] Merging skinned and static mesh motion shaders using an optional vertext stream. This removes the log spam "Mesh does not have all the required input streams. Missing 'POSITIONT0'." and allows Material::GetShaderCollection() to be const only as it was intended. The MeshFeatureProcessor also no longer needs to decide which motion vector shader to use, and therefore no longer has m_skinnedMeshWithMotion in the descriptor to acquire a mesh.
5 years ago
mnaumov ac7ec103c8 Fixing PDO offset tooltip 5 years ago
Ken Pruiksma 0a11931422
Removing reference to non-existent parallax.invert property. (#1409) 5 years ago
Ken Pruiksma cf9e088133
ATOM-15708 ATOM-15709. Disabling the low end shader for blended and tinted transparencies. The standard shader is already drawing in the transparent pass for those blend modes. Also improving the way StandardPBR_HandleOpacityMode is getting the correct shader by using a tag instead of index. (#1355) 5 years ago
Ken Pruiksma bf76963696
[ATOM-15683] StandardPBR shader now makes sure to mark w for no subsurface scattering. Currently all StandardPBR materials are being subject to a 2x2 box blur because the DiffuseSpecalarMerge pass thinks they have samples with subsurface scattering turned on, and this is degrading the quality of diffuse. (#1249) 5 years ago
Doug McDiarmid ef05412063 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 5 years ago
Qing Tao c009e7d50b
ATOM-4782 [Material] Transparent pass is using StandardPBR_Forwardpass shader with incorrect SRG (#1103)
Removed TransparentPassSrg until we have pbr shaders TransparentPassSrg
5 years ago
Doug McDiarmid 35d7ee5e53 Merge branch 'main' into Atom/dmcdiar/ATOM-15517 5 years ago
Doug McDiarmid 59ab6edaef Added occlusion culling plane visualization 5 years ago
Chris Santora 147f0084a8 Removed subsurface scattering and transmission features from StandardPBR.materialtype.
ATOM-4120 Stabilize Standard PBR Regarding Subsurface and Translucency
5 years ago
Chris Santora 2112da5f85 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
5 years ago
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
5 years ago
Chris Santora 05654ea152 ATOM-15653 Remove Unnecessary Parallax Map Invert Flag
Removed the parallax invert flags and instead all the materials assume displacement is always specified as heightmaps.
Updated property naming, tooltips, and shader variable names to reflect this.
Updated ParallaxMapping.azsli to treat depthOffset as an offset in depth value rather than an offset in height value, so it matches the fact that ParallaxMapping.azsli always operates in depth values rather than height values.
5 years ago
Chris Santora b206e7ffe5 ATOM-15295 Remove Unnecessary Enable Material Properties
The only remaining unnecessary enable flag I found was for the parallax property group. It is removed, and now we just use the texture map and useTexture flag to gate whether the feature is enabled.
5 years ago
Chris Santora 014f715fd8 ATOM-14037 StandardPBR TintedTransparent Opacity
Copied tinted transparency opacity mode from EnhancedPBR to StandardPBR.
Fixed a bug in EnhancedPBR where Blended opacity didn't work right because the second DrawListOverride functor was stomping on the results of the first DrawListOverride. I removed these functors and made StandardPBR_HandleOpacityMode.lua set the draw list override instead.
5 years ago
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).
5 years ago
Chris Santora 6f47f28051 Merge remote-tracking branch 'upstream/main' into Atom/santorac/MaterialTypeCleanup 5 years ago