123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- {
- "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": "HairColorImage",
- "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"
- }
- },
- {
- "LocalSlot": "HairColorRenderTarget",
- "AttachmentRef": {
- "Pass": "This",
- "Attachment": "HairColorImage"
- }
- }
- ],
- "PassData": {
- "$type": "RasterPassData",
- "DrawListTag": "HairGeometryShadingDrawList",
- "BindViewSrg": true,
- "PassSrgShaderAsset": {
- // Looking for it in the Shaders directory relative to the Assets directory
- "FilePath": "Shaders/HairShortCutGeometryShading.shader"
- }
- }
- }
- }
- }
|