addressed review feedback and resolved issues from merge with main
This commit is contained in:
@@ -274,11 +274,6 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
float2 emissiveUv = IN.m_uv[MaterialSrg::m_emissiveMapUvIndex];
|
||||
lightingData.emissiveLighting = GetEmissiveInput(MaterialSrg::m_emissiveMap, MaterialSrg::m_sampler, emissiveUv, MaterialSrg::m_emissiveIntensity, MaterialSrg::m_emissiveColor.rgb, o_emissiveEnabled, o_emissive_useTexture);
|
||||
|
||||
// ------- Occlusion -------
|
||||
|
||||
float2 occlusionUv = IN.m_uv[MaterialSrg::m_ambientOcclusionMapUvIndex];
|
||||
lightingData.occlusion = GetOcclusionInput(MaterialSrg::m_ambientOcclusionMap, MaterialSrg::m_sampler, occlusionUv, MaterialSrg::m_ambientOcclusionFactor, o_ambientOcclusion_useTexture);
|
||||
|
||||
// ------- Clearcoat -------
|
||||
|
||||
// [GFX TODO][ATOM-14603]: Clean up the double uses of these clear coat flags
|
||||
|
||||
@@ -191,16 +191,8 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float
|
||||
|
||||
// ------- Subsurface -------
|
||||
|
||||
float2 subsurfaceUv = IN.m_uv[MaterialSrg::m_subsurfaceScatteringInfluenceMapUvIndex];
|
||||
float surfaceScatteringFactor = GetSubsurfaceInput(MaterialSrg::m_subsurfaceScatteringInfluenceMap, MaterialSrg::m_sampler, subsurfaceUv, MaterialSrg::m_subsurfaceScatteringFactor);
|
||||
|
||||
// ------- Transmission -------
|
||||
|
||||
float2 transmissionUv = IN.m_uv[MaterialSrg::m_transmissionThicknessMapUvIndex];
|
||||
float4 transmissionTintThickness = GeTransmissionInput(MaterialSrg::m_transmissionThicknessMap, MaterialSrg::m_sampler, transmissionUv, MaterialSrg::m_transmissionTintThickness);
|
||||
surface.transmission.tint = transmissionTintThickness.rgb;
|
||||
surface.transmission.thickness = transmissionTintThickness.w;
|
||||
surface.transmission.transmissionParams = MaterialSrg::m_transmissionParams;
|
||||
float surfaceScatteringFactor = 0.0f;
|
||||
surface.transmission.InitializeToZero();
|
||||
|
||||
// ------- Lighting Data -------
|
||||
|
||||
|
||||
@@ -93,11 +93,6 @@
|
||||
"SlotType": "InputOutput",
|
||||
"ScopeAttachmentUsage": "RenderTarget"
|
||||
},
|
||||
{
|
||||
"Name": "ClearCoatNormalOutput",
|
||||
"SlotType": "InputOutput",
|
||||
"ScopeAttachmentUsage": "RenderTarget"
|
||||
},
|
||||
// Outputs...
|
||||
{
|
||||
"Name": "ScatterDistanceOutput",
|
||||
|
||||
@@ -216,13 +216,6 @@
|
||||
"Pass": "ForwardMSAAPass",
|
||||
"Attachment": "NormalOutput"
|
||||
}
|
||||
},
|
||||
{
|
||||
"LocalSlot": "ClearCoatNormalOutput",
|
||||
"AttachmentRef": {
|
||||
"Pass": "ForwardMSAAPass",
|
||||
"Attachment": "ClearCoatNormalOutput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"PassData": {
|
||||
|
||||
+2
-4
@@ -18,8 +18,7 @@ struct ForwardPassOutput
|
||||
float4 m_albedo : SV_Target2;
|
||||
float4 m_specularF0 : SV_Target3;
|
||||
float4 m_normal : SV_Target4;
|
||||
float4 m_clearCoatNormal : SV_Target5;
|
||||
float3 m_scatterDistance : SV_Target6;
|
||||
float3 m_scatterDistance : SV_Target5;
|
||||
};
|
||||
|
||||
struct ForwardPassOutputWithDepth
|
||||
@@ -30,7 +29,6 @@ struct ForwardPassOutputWithDepth
|
||||
float4 m_albedo : SV_Target2;
|
||||
float4 m_specularF0 : SV_Target3;
|
||||
float4 m_normal : SV_Target4;
|
||||
float4 m_clearCoatNormal : SV_Target5;
|
||||
float3 m_scatterDistance : SV_Target6;
|
||||
float3 m_scatterDistance : SV_Target5;
|
||||
float m_depth : SV_Depth;
|
||||
};
|
||||
|
||||
+2
-6
@@ -93,7 +93,6 @@ struct PbrLightingOutput
|
||||
float4 m_albedo;
|
||||
float4 m_specularF0;
|
||||
float4 m_normal;
|
||||
float4 m_clearCoatNormal;
|
||||
float3 m_scatterDistance;
|
||||
};
|
||||
|
||||
@@ -107,13 +106,10 @@ PbrLightingOutput GetPbrLightingOutput(Surface surface, LightingData lightingDat
|
||||
|
||||
// albedo, specularF0, roughness, and normals for later passes (specular IBL, Diffuse GI, SSR, AO, etc)
|
||||
lightingOutput.m_specularF0 = float4(surface.specularF0, surface.roughnessLinear);
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse;
|
||||
lightingOutput.m_albedo.a = lightingData.occlusion;
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse * lightingData.diffuseAmbientOcclusion;
|
||||
lightingOutput.m_albedo.a = lightingData.specularOcclusion;
|
||||
lightingOutput.m_normal.rgb = EncodeNormalSignedOctahedron(surface.normal);
|
||||
lightingOutput.m_normal.a = o_specularF0_enableMultiScatterCompensation ? 1.0f : 0.0f;
|
||||
|
||||
// layout: (packedNormal.x, packedNormal.y, strength factor, clear coat roughness (not base material's roughness))
|
||||
lightingOutput.m_clearCoatNormal = float4(EncodeNormalSphereMap(surface.clearCoat.normal), o_clearCoat_feature_enabled ? surface.clearCoat.factor : 0.0, surface.clearCoat.roughness);
|
||||
|
||||
return lightingOutput;
|
||||
}
|
||||
|
||||
+2
-6
@@ -84,7 +84,6 @@ struct PbrLightingOutput
|
||||
float4 m_albedo;
|
||||
float4 m_specularF0;
|
||||
float4 m_normal;
|
||||
float4 m_clearCoatNormal;
|
||||
float3 m_scatterDistance;
|
||||
};
|
||||
|
||||
@@ -98,13 +97,10 @@ PbrLightingOutput GetPbrLightingOutput(Surface surface, LightingData lightingDat
|
||||
|
||||
// albedo, specularF0, roughness, and normals for later passes (specular IBL, Diffuse GI, SSR, AO, etc)
|
||||
lightingOutput.m_specularF0 = float4(surface.specularF0, surface.roughnessLinear);
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse;
|
||||
lightingOutput.m_albedo.a = lightingData.occlusion;
|
||||
lightingOutput.m_albedo.rgb = surface.albedo * lightingData.diffuseResponse * lightingData.diffuseAmbientOcclusion;
|
||||
lightingOutput.m_albedo.a = lightingData.specularOcclusion;
|
||||
lightingOutput.m_normal.rgb = EncodeNormalSignedOctahedron(surface.normal);
|
||||
lightingOutput.m_normal.a = o_specularF0_enableMultiScatterCompensation ? 1.0f : 0.0f;
|
||||
|
||||
// layout: (packedNormal.x, packedNormal.y, strength factor, clear coat roughness (not base material's roughness))
|
||||
lightingOutput.m_clearCoatNormal = float4(EncodeNormalSphereMap(surface.clearCoat.normal), o_clearCoat_feature_enabled ? surface.clearCoat.factor : 0.0, surface.clearCoat.roughness);
|
||||
|
||||
return lightingOutput;
|
||||
}
|
||||
|
||||
-4
@@ -75,7 +75,6 @@ struct PbrLightingOutput
|
||||
float4 m_albedo;
|
||||
float4 m_specularF0;
|
||||
float4 m_normal;
|
||||
float4 m_clearCoatNormal;
|
||||
float3 m_scatterDistance;
|
||||
};
|
||||
|
||||
@@ -94,9 +93,6 @@ PbrLightingOutput GetPbrLightingOutput(Surface surface, LightingData lightingDat
|
||||
lightingOutput.m_normal.rgb = EncodeNormalSignedOctahedron(surface.normal);
|
||||
lightingOutput.m_normal.a = o_specularF0_enableMultiScatterCompensation ? 1.0f : 0.0f;
|
||||
|
||||
// layout: (packedNormal.x, packedNormal.y, strength factor, clear coat roughness (not base material's roughness))
|
||||
lightingOutput.m_clearCoatNormal = float4(EncodeNormalSphereMap(surface.clearCoat.normal), o_clearCoat_feature_enabled ? surface.clearCoat.factor : 0.0, surface.clearCoat.roughness);
|
||||
|
||||
return lightingOutput;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -17,9 +17,8 @@
|
||||
#include <Atom/Features/PBR/Surfaces/ClearCoatSurfaceData.azsli>
|
||||
#include <Atom/Features/PBR/Surfaces/TransmissionSurfaceData.azsli>
|
||||
|
||||
class Surface //: BasePbrSurfaceData
|
||||
class Surface
|
||||
{
|
||||
//BasePbrSurfaceData pbr;
|
||||
AnisotropicSurfaceData anisotropy;
|
||||
ClearCoatSurfaceData clearCoat;
|
||||
TransmissionSurfaceData transmission;
|
||||
|
||||
+1
-2
@@ -17,9 +17,8 @@
|
||||
#include <Atom/Features/PBR/Surfaces/ClearCoatSurfaceData.azsli>
|
||||
#include <Atom/Features/PBR/Surfaces/TransmissionSurfaceData.azsli>
|
||||
|
||||
class Surface //: BasePbrSurfaceData
|
||||
class Surface
|
||||
{
|
||||
//BasePbrSurfaceData pbr;
|
||||
ClearCoatSurfaceData clearCoat;
|
||||
TransmissionSurfaceData transmission;
|
||||
|
||||
|
||||
+1
-2
@@ -17,9 +17,8 @@
|
||||
#include <Atom/Features/PBR/Surfaces/ClearCoatSurfaceData.azsli>
|
||||
#include <Atom/Features/PBR/Surfaces/TransmissionSurfaceData.azsli>
|
||||
|
||||
class Surface //: BasePbrSurfaceData
|
||||
class Surface
|
||||
{
|
||||
//BasePbrSurfaceData pbr;
|
||||
ClearCoatSurfaceData clearCoat;
|
||||
TransmissionSurfaceData transmission;
|
||||
|
||||
|
||||
+1
-14
@@ -4,15 +4,6 @@
|
||||
"parentMaterial": "",
|
||||
"propertyLayoutVersion": 3,
|
||||
"properties": {
|
||||
"emissive": {
|
||||
"color": [
|
||||
1.0,
|
||||
0.0,
|
||||
0.0,
|
||||
1.0
|
||||
],
|
||||
"intensity": 4.119999885559082
|
||||
},
|
||||
"subsurfaceScattering": {
|
||||
"enableSubsurfaceScattering": true,
|
||||
"influenceMap": "TestData/Textures/checker8x8_512.png",
|
||||
@@ -23,11 +14,7 @@
|
||||
1.0
|
||||
],
|
||||
"scatterDistance": 40.0,
|
||||
"subsurfaceScatterFactor": 1.0,
|
||||
"thickness": 0.41999998688697817,
|
||||
"transmissionMode": "ThinObject",
|
||||
"transmissionScale": 6.599999904632568,
|
||||
"useThicknessMap": false
|
||||
"subsurfaceScatterFactor": 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ ForwardPassOutput AutoBrick_ForwardPassPS(VSOutput IN)
|
||||
|
||||
// Shadow
|
||||
lightingData.shadowCoords = IN.m_shadowCoords;
|
||||
lightingData.occlusion = 1.0f - surfaceDepth * AutoBrickSrg::m_aoFactor;
|
||||
lightingData.diffuseAmbientOcclusion = 1.0f - surfaceDepth * AutoBrickSrg::m_aoFactor;
|
||||
|
||||
// Diffuse and Specular response
|
||||
lightingData.specularResponse = FresnelSchlickWithRoughness(lightingData.NdotV, surface.specularF0, surface.roughnessLinear);
|
||||
|
||||
Reference in New Issue
Block a user