ce713fad5e
- Back light correction. This fix will block TT lobe (back lobe) from allowing light transfer - By doing this we remove the requirement to add self shadowing in most cases, hence removing heavy render pass. Exception: - Thin hair will still pass light and therefor there is still a need to read depth buffer and compare as a second step to avoid adding heavy shadowing pass / comparison. Signed-off-by: Adi Bar-Lev <82479970+Adi-Amazon@users.noreply.github.com>
162 lines
6.2 KiB
Plaintext
162 lines
6.2 KiB
Plaintext
{
|
|
"Type": "JsonSerialization",
|
|
"Version": 1,
|
|
"ClassName": "PassAsset",
|
|
"ClassData": {
|
|
"PassTemplate": {
|
|
"Name": "HairShortCutGeometryShadingPassTemplate",
|
|
"PassClass": "HairShortCutGeometryShadingPass",
|
|
"Slots": [
|
|
|
|
{ // Temporary color buffer to store the gathered shaded hair color - MSAA
|
|
"Name": "HairColorRenderTarget",
|
|
"SlotType": "Output",
|
|
"ScopeAttachmentUsage": "RenderTarget",
|
|
"LoadStoreAction": {
|
|
"LoadAction": "Clear",
|
|
"ClearValue": { // reverse depth order: closer --> 1.0
|
|
"Value": [ 0.0, 0.0, 0.0, 0.0 ]
|
|
},
|
|
"StoreAction": "Store"
|
|
}
|
|
},
|
|
|
|
{
|
|
// This RT is MSAA - is it cheaper to avoid doing this work and only do a copy at a separate pass?
|
|
"Name": "RenderTargetInputOutput",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
},
|
|
{ // Used to get the transform from screen space to world space.
|
|
"Name": "DepthLinear",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
},
|
|
{ // Used as the thickness accumulation to block TT (back) lobe lighting
|
|
"Name": "AccumulatedInverseAlpha",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader",
|
|
"ShaderInputName": "m_accumInvAlpha"
|
|
},
|
|
{ // For comparing the depth to early disqualify but not to write
|
|
"Name": "Depth",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "DepthStencil"
|
|
},
|
|
{
|
|
"Name": "SkinnedHairSharedBuffer",
|
|
"ShaderInputName": "m_skinnedHairSharedBuffer",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
},
|
|
|
|
//------------- Shadowing Resources -------------
|
|
{
|
|
"Name": "DirectionalShadowmap",
|
|
"ShaderInputName": "m_directionalLightShadowmap",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader",
|
|
"ImageViewDesc": {
|
|
"IsArray": 1
|
|
}
|
|
},
|
|
{
|
|
"Name": "DirectionalESM",
|
|
"ShaderInputName": "m_directionalLightExponentialShadowmap",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader",
|
|
"ImageViewDesc": {
|
|
"IsArray": 1
|
|
}
|
|
},
|
|
{
|
|
"Name": "ProjectedShadowmap",
|
|
"ShaderInputName": "m_projectedShadowmaps",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader",
|
|
"ImageViewDesc": {
|
|
"IsArray": 1
|
|
}
|
|
},
|
|
{
|
|
"Name": "ProjectedESM",
|
|
"ShaderInputName": "m_projectedExponentialShadowmap",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader",
|
|
"ImageViewDesc": {
|
|
"IsArray": 1
|
|
}
|
|
},
|
|
|
|
//------------- Lighting Resources -------------
|
|
{
|
|
"Name": "BRDFTextureInput",
|
|
"ShaderInputName": "m_brdfMap",
|
|
"SlotType": "Input",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
},
|
|
{
|
|
"Name": "TileLightData",
|
|
"SlotType": "Input",
|
|
"ShaderInputName": "m_tileLightData",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
},
|
|
{
|
|
"Name": "LightListRemapped",
|
|
"SlotType": "Input",
|
|
"ShaderInputName": "m_lightListRemapped",
|
|
"ScopeAttachmentUsage": "Shader"
|
|
}
|
|
|
|
],
|
|
"ImageAttachments": [
|
|
{
|
|
// The shader hair color render target - important to have at a non-MSAA mode
|
|
// so that no overwork is done on sampling.
|
|
"Name": "HairColorRenderTarget",
|
|
"SizeSource": {
|
|
"Source": {
|
|
"Pass": "Parent",
|
|
"Attachment": "RenderTargetInputOutput"
|
|
}
|
|
},
|
|
"ImageDescriptor": {
|
|
"Format": "R16G16B16A16_FLOAT",
|
|
"SharedQueueMask": "Graphics",
|
|
"BindFlags": [
|
|
"Color",
|
|
"ShaderRead"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Name": "BRDFTexture",
|
|
"Lifetime": "Imported",
|
|
"AssetRef": {
|
|
"FilePath": "Textures/BRDFTexture.attimage"
|
|
}
|
|
}
|
|
],
|
|
"Connections": [
|
|
{
|
|
"LocalSlot": "BRDFTextureInput",
|
|
"AttachmentRef": {
|
|
"Pass": "This",
|
|
"Attachment": "BRDFTexture"
|
|
}
|
|
}
|
|
],
|
|
"PassData": {
|
|
"$type": "RasterPassData",
|
|
"DrawListTag": "HairGeometryShadingDrawList",
|
|
"PipelineViewTag": "MainCamera",
|
|
"PassSrgShaderAsset": {
|
|
// Looking for it in the Shaders directory relative to the Assets directory
|
|
"FilePath": "Shaders/HairShortCutGeometryShading.shader"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|