123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- {
- "Type": "JsonSerialization",
- "Version": 1,
- "ClassName": "PassAsset",
- "ClassData": {
- "PassTemplate": {
- "Name": "HairShortCutGeometryDepthAlphaPassTemplate",
- "PassClass": "HairShortCutGeometryDepthAlphaPass",
- "Slots": [
- {
- "Name": "SkinnedHairSharedBuffer",
- "ShaderInputName": "m_skinnedHairSharedBuffer",
- "SlotType": "Input",
- "ScopeAttachmentUsage": "Shader"
- },
- { // DepthStencil for early disqualifying the pixel based on depth. No write.
- "Name": "Depth",
- "SlotType": "Input",
- "ScopeAttachmentUsage": "DepthStencil"
- },
- {
- // the regular render target is blended using inverse alpha to reduce the
- // incoming color contribution based on the hair thickness and alpha.
- "Name": "InverseAlphaRTOutput",
- "SlotType": "Output",
- "ScopeAttachmentUsage": "RenderTarget",
- "LoadStoreAction": {
- "LoadAction": "Clear",
- "ClearValue": {
- "Value": [ 1.0, 1.0, 1.0, 1.0 ]
- },
- "StoreAction": "Store"
- }
- },
- {
- "Name": "HairDepthsTextureArray",
- "SlotType": "Output",
- "ScopeAttachmentUsage": "Shader",
- "ShaderInputName": "m_RWFragmentDepthsTexture",
- "LoadStoreAction": {
- "LoadAction": "Clear",
- "ClearValue": { // reverse depth order: closer --> 1.0
- "Value": [ 0.0, 0.0, 0.0, 0.0 ]
- },
- "StoreAction": "Store"
- }
- }
- ],
- "ImageAttachments": [
- {
- // This buffer is used as the render target and should be at non-MSAA screen resolution
- // to make sure no overwork is done.
- "Name": "InverseAlphaRTImage",
- "SizeSource": {
- "Source": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- "ImageDescriptor": {
- "Format": "R32_FLOAT",
- "SharedQueueMask": "Graphics",
- "BindFlags": [
- "Color",
- "ShaderRead"
- ]
- }
- },
- {
- "Name": "HairDepthsTextureArray",
- "SizeSource": {
- "Source": {
- "Pass": "Parent",
- "Attachment": "DepthLinear"
- }
- },
- "ImageDescriptor": {
- "Format": "R32_UINT",
- "ArraySize": "3",
- "SharedQueueMask": "Graphics",
- "BindFlags": [
- "ShaderReadWrite",
- "ShaderWrite",
- "ShaderRead"
- ]
- }
- }
- ],
- "Connections": [
- {
- "LocalSlot": "InverseAlphaRTOutput",
- "AttachmentRef": {
- "Pass": "This",
- "Attachment": "InverseAlphaRTImage"
- }
- }
- ],
- "PassData": {
- "$type": "RasterPassData",
- "DrawListTag": "HairGeometryDepthAlphaDrawList",
- "BindViewSrg": true,
- "PassSrgShaderAsset": {
- // Looking for it in the Shaders directory relative to the Assets directory
- "FilePath": "Shaders/HairShortCutGeometryDepthAlpha.shader"
- }
- }
- }
- }
- }
|