{
    "Name": "Mesh Reconstruction Common Data",
    "OverrideMaterial": "engine:pbrCommon.rematerialdefinition",
    "Parameters": {
        "Constants": {
            "colorTint"               : "[1, 1, 1, 1]",
            "lightingEnabled"         : "false",
            "intensityScale"          : "0.9",
            "normalDotThreshold"      : "0",
            "lightDirection"          : "[0, 0, 1]",
            "dynamicLightingEnabled"  : "false",
            "dynamicLightingVertexColorEnabled" : "false",
            "dynamicLightingMaterialRMSEnabled" : "false"
        },
        "Buffers": {
            "meshReceiverConstants" : "scene.meshReceiverConstants",
            "meshReceiverPerSceneConstants" : "scene.meshReceiverPerSceneConstants",
            "meshReceiverConstants" : "scene.meshReceiverConstants",
            "materialRMS": "geometry.faceMaterialRMS",
            "prepassParameterArray": "fallback.zeros1024bytes",
            "clearParameterArray": "fallback.zeros1024bytes",
            "meshShadowMipDescriptionBuffer": "fallback.zeros1024bytes"
        },
        "Textures": {
            "textureProjectiveMeshShadow"              : "fallback.transparentBlank",
            "textureTiledDepthPrepass"                 : "fallback.white",
            "compositedSceneUnderstandingShadowsColor" : "fallback.transparentBlank",
            "compositedSceneUnderstandingShadowsDepth" : "fallback.transparentBlank"
        }
    },
    "Techniques" : [
        {
            "Name": "CompositeMeshShadowsWithDepthTest",
            "VertexShader": {
                "Entry": "fullScreenVert"
            },
            "PixelShader": {
                "Entry": "fsCompositeMeshShadowsWithDepth"
            },
            "State" : {
                "AlphaBlend"           : false,
                "WriteDepth"           : false,
                "DepthCompareFunction" : "GreaterEqual"
            }
        },
        {
            "Name": "OcclusionOnly",
            "VertexShader": {
                "Entry": "vsOcclusion"
            },
            "State" : {
                "WriteDepth"           : true,
                "DepthCompareFunction" : "Greater"
            }
        },
        {
            "Name": "InstancedOcclusionOnly",
            "VertexShader": {
                "Entry": "vsViewportInstancing"
            },
            "State" : {
                "WriteDepth"           : true,
                "DepthCompareFunction" : "Less"
            }
        },
                {
            "Name": "InstancedOcclusionOnlyDepthAsColor",
            "VertexShader": {
                "Entry": "vsViewportInstancing"
            },
            "PixelShader": {
                "Entry": "fsRealityMeshDepthAsColor"
            },
            "State" : {
                "WriteDepth"           : true,
                "DepthCompareFunction" : "Less"
            },
            "SupportsRuntimeFunctionConstants": "true"
        },
        {
            "Name": "OcclusionFakeColorWrite",
            "VertexShader": {
                "Entry": "vsRealityPbr"
            },
            "State" : {
                "AlphaBlend"           : false,
                "ColorWriteMask"       : "None",
                "WriteDepth"           : true,
                "DepthCompareFunction" : "Greater"
            }
        },
        {
            "Name": "OcclusionWithShadowAndLighting",
            "VertexShader": {
                "Entry": "vsMeshSoftShadowReceiver"
            },
            "PixelShader": {
                "Entry": "fsMeshSoftShadowReceiver"
            },
            "State" : {
                "AlphaBlend"           : false,
                "WriteDepth"           : true,
                "DepthCompareFunction" : "Greater"
            },
            "FunctionConstants" : {
                "EnableIBL"              : "false",
                "EnableAREnvProbe"       : "false",
                "EnableProjectiveShadow" : "true",
                "ForceEnableShadows"     : "false",
                "ForceEnableMeshLighting" : "false",
                "EnableVertexColor"      : "true"
            },
            "Variations" : {
                "EnableDynamicLighting" : ["true", "false"]
            },
            "RuntimeFunctionConstantDefaults" : {
                "EnableDynamicLighting" : "true"
            },
            "SupportsRuntimeFunctionConstants" : true
        },
        {
            "Name": "OcclusionAlphaBlendWithShadowAndLighting",
            "VertexShader": {
                "Entry": "vsRealityPbr"
            },
            "PixelShader": {
                "Entry": "fsMeshSoftShadowReceiver"
            },
            "State" : {
                "AlphaBlend"             : true,
                "WriteDepth"             : true,
                "DepthCompareFunction"   : "GreaterEqual",
                "AlphaBlendOperation"    : "Add",
                "AlphaSourceFactor"      : "One",
                "AlphaDestinationFactor" : "OneMinusSourceAlpha",
                "RgbBlendOperation"      : "Add",
                "RgbSourceFactor"        : "One",
                "RgbDestinationFactor"   : "OneMinusSourceAlpha"
            },
            "FunctionConstants" : {
                "EnableIBL"              : "false",
                "EnableAREnvProbe"       : "false",
                "EnableProjectiveShadow" : "true",
                "ForceEnableShadows"     : "false",
                "ForceEnableMeshLighting" : "false"
            },
            "Variations" : {
                "EnableDynamicLighting" : ["true", "false"]
            },
            "RuntimeFunctionConstantDefaults" : {
                "EnableDynamicLighting" : "true"
            },
            "SupportsRuntimeFunctionConstants" : true
        },
        {
            "Name": "WireframeMesh",
            "VertexShader": {
                "Entry": "vsUnlit"
            },
            "PixelShader": {
                "Entry": "fsMeshDepth"
            },
            "State" : {
                "WriteDepth"           : true,
                "DepthCompareFunction" : "GreaterEqual"
            }
        },
        {
            "Name": "OcclusionWithLighting",
            "VertexShader": {
                "Entry": "vsMeshSoftShadowReceiver",
                "Library" : "engine:default.metallib"
            },
            "PixelShader": {
                "Entry": "fsMeshSoftShadowReceiver",
                "Library" : "engine:default.metallib"
            },
            "State" : {
                "AlphaBlend"             : true,
                "WriteDepth"             : true,
                "DepthCompareFunction"   : "Greater",
                "AlphaBlendOperation"    : "Add",
                "AlphaSourceFactor"      : "One",
                "AlphaDestinationFactor" : "OneMinusSourceAlpha",
                "RgbBlendOperation"      : "Add",
                "RgbSourceFactor"        : "One",
                "RgbDestinationFactor"   : "OneMinusSourceAlpha"

            },
            "FunctionConstants" : {
                "EnableIBL"              : "false",
                "EnableAREnvProbe"       : "false",
                "EnableProjectiveShadow" : "false",
                "EnableVertexColor"      : "true",
                "ForceEnableShadows"     : "false",
                "ForceEnableMeshLighting" : "false"
            },
            "Variations" : {
                "EnableDynamicLighting" : ["true", "false"]
            },
            "RuntimeFunctionConstantDefaults" : {
                "EnableDynamicLighting" : "true"
            },
            "SupportsRuntimeFunctionConstants" : true
        },
        {
            "Name": "ShadowClear",
            "VertexShader": {
                "Entry": "vsClearShadowDepth"
            },
            "PixelShader": {
                "Entry": "fsMeshShadowClearTile"
            },
            "State" : {
                "AlphaBlend"             : false,
                "WriteDepth"             : false,
                "DepthCompareFunction"   : "Always"
            },
            "SupportsRuntimeFunctionConstants": "true"
        },
        {
            "Name": "DepthColorClear",
            "VertexShader": {
                "Entry": "vsClearShadowReceiverDepth"
            },
            "State" : {
                "AlphaBlend"             : false,
                "WriteDepth"             : true,
                "DepthCompareFunction"   : "Always"
            },
            "PixelShader": {
                "Entry": "fsMeshShadowClearDepthPrepass"
            },
            "SupportsRuntimeFunctionConstants": "true"
        }
    ]
}
