{
    "Name": "SurfaceShaderUnlitCommon",
    "OverrideMaterial": "engine:pbrCommon.rematerialdefinition",
    "Parameters": {
        "Constants": {
            "userParameter"  : "[0,0,0,0]",
            "externalColorMatchMatrix" : "[1,0,0,0,1,0,0,0,1]",
            "YCbCrMatrixOption" : "0",
            "imageFunctionOption" : "0",
            "stereoModeOption" : "0",
            "colorSpaceTransformationMatrix" : "[1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0]",
            "videoGammaToneCurveEnabled" : "false",
            "videoColorSpaceTransformationEnabled" : "false",
            "videoColorSpaceTransformationMatrix" : "[1.0,0.0,0.0, 0.0,1.0,0.0, 0.0,0.0,1.0]",
            "videoBrightnessScalingEnabled" : "false",
            "videoBrightnessScale" : "1.0",
            "videoGammaBoostEnabled" : "false",
            "anchorId" : "0"
        },
        "Buffers": {
            "anchorConstantsArray" : "scene.anchorConstants",
            "userConstants"  : "fallback.zeros"
        },
        "Textures": {
            "textureCustom"  : "fallback.black",
            "texturePlane0": "fallback.black",
            "texturePlane1": "fallback.black",
            "texturePlane2": "fallback.white",
            "texturePlane0ChannelID2": "fallback.black",
            "texturePlane1ChannelID2": "fallback.black",
            "texturePlane2ChannelID2": "fallback.white",
            "videoTexturePlane0[0]": "fallback.black",
            "videoTexturePlane1[0]": "fallback.black",
            "videoTexturePlane2[0]": "fallback.white",
            "videoTexturePlane0[1]": "fallback.black",
            "videoTexturePlane1[1]": "fallback.black",
            "videoTexturePlane2[1]": "fallback.white",
            "textureSpill": "fallback.black",
            "textureSpill2": "fallback.black",
            "videoGammaToneCurvePowerFunctionTable": "fallback.white1D",
            "videoGammaBoostPowerFunctionTable": "fallback.white1D"
        }
    },
    "Techniques": [
    {
        "Name": "SurfaceShaderOpaque",
        "VertexShader": {
            "Entry": "realitykit::vsGeometryModifier"
        },
        "PixelShader": {
            "Entry": "realitykit::fsSurfacePbr"
        },
        "State" : {
            "AlphaBlend" : false,
            "WriteDepth" : true,
            "DepthCompareFunction" : "GreaterEqual"
        },
        "FunctionConstants" : {
            "EnableBaseColorMap"        : "true",
            "EnableNormalMap"           : "true",
            "EnableEmissiveMap"         : "true",
            "EnableSeparateRMAS"        : "true",
            "EnableSingleRMAS"          : "false",
            "EnableRoughnessMap"        : "true",
            "EnableMetallicMap"         : "true",
            "EnableAOMap"               : "true",
            "EnableSpecularMap"         : "true",
            "EnableOpacityMap"          : "true",

            "VertexColorOption"         : "0",
            "EnableVertexColor"         : "true",
            "EnableMultiUVs"            : "true",

            "EnableIBL"                 : "false",
            "EnableSurfaceShaderEnvInputs" : "true",
            "EnableAREnvProbe"          : "false",
            "EnableDynamicLighting"     : "false",
            "EnableLightmap"            : "false",

            "EnableNdfFiltering"        : "false",
            "EnableMultiscatter"        : "false",
            "SupportsPrefilteredProbes" : "false",

            "EnableSurfaceShaderColorDithering" : "false",

            "RenderToCompositeLayer"    : "false",
            "EnableGlow"                : "false",
            "PerceptualBlendingMode"    : "0",
            "EnableNearFieldVignetting" : "false",
            "EnableBtMask"              : "false",

            "EnableTriPlanarVideoSupport" : "false",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "false",
            "EnableVideoColorTransformation" : "false",
            "DisableFadeOpacity"        : "true"
        },
        "Variations" : {
            "EnableTriPlanarVideoSupport" : ["false", "true"],
            "ExperienceMode" : ["0", "1", "2"],
            "EnableVideoColorSpaceTransformation" : ["false", "true"],
            "EnableVideoColorTransformation" : ["false", "true"]
        },
        "RuntimeFunctionConstantDefaults" : {
            "EnableTriPlanarVideoSupport" : "true",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "true",
            "EnableVideoColorTransformation" : "true"
        },
        "DefaultVariations" : [ "UnlitCommon" ],
        "InstancedArguments" : [ "instanceConstantsArray" ],
        "DebugMapping": "PbrDebug",
        "SupportsRuntimeFunctionConstants" : true,
        "PreloadOptions" : {
            "PixelFormat" : [115],
            "SampleCount" : [4],
            "OverrideFlags" : [0, 2]
        },
        "UseDynamicAttributeStride" : true
    },
    {
        "Name": "SurfaceShaderTransparent",
        "VertexShader": {
            "Entry": "realitykit::vsGeometryModifier"
        },
        "PixelShader": {
            "Entry": "realitykit::fsSurfacePbr"
        },
        "State" : {
            "PreferProgrammableBlending": true,
            "AlphaBlend"                : true,
            "WriteDepth"                : true,
            "DepthCompareFunction"      : "GreaterEqual",
            "AlphaBlendOperation"       : "Add",
            "AlphaSourceFactor"         : "One",
            "AlphaDestinationFactor"    : "OneMinusSourceAlpha",
            "RgbBlendOperation"         : "Add",
            "RgbSourceFactor"           : "One",
            "RgbDestinationFactor"      : "OneMinusSourceAlpha"
        },
        "FunctionConstants" : {
            "EnableBaseColorMap"    : "true",
            "EnableNormalMap"       : "true",
            "EnableEmissiveMap"     : "true",
            "EnableSeparateRMAS"    : "true",
            "EnableSingleRMAS"      : "false",
            "EnableRoughnessMap"    : "true",
            "EnableMetallicMap"     : "true",
            "EnableAOMap"           : "true",
            "EnableSpecularMap"     : "true",
            "EnableOpacityMap"      : "true",

            "EnableTransparency"    : "true",
            "VertexColorOption"     : "0",
            "EnableVertexColor"     : "true",
            "EnableMultiUVs"        : "true",

            "EnableIBL"             : "false",
            "EnableSurfaceShaderEnvInputs" : "true",
            "EnableAREnvProbe"      : "false",
            "EnableDynamicLighting" : "false",
            "EnableLightmap"        : "false",

            "EnableNdfFiltering"        : "false",
            "EnableMultiscatter"        : "false",
            "SupportsPrefilteredProbes" : "false",

            "EnableSurfaceShaderColorDithering" : "false",

            "RenderToCompositeLayer"    : "false",
            "EnableGlow"                : "false",
            "PerceptualBlendingMode"    : "0",
            "EnableNearFieldVignetting" : "false",
            "EnableBtMask"              : "false",

            "EnableTriPlanarVideoSupport" : "false",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "false",
            "EnableVideoColorTransformation" : "false"
        },
        "Variations" : {
            "EnableTriPlanarVideoSupport" : ["false", "true"],
            "ExperienceMode" : ["0", "1", "2"],
            "EnableVideoColorSpaceTransformation" : ["false", "true"],
            "EnableVideoColorTransformation" : ["false", "true"]
        },
        "RuntimeFunctionConstantDefaults" : {
            "EnableTriPlanarVideoSupport" : "true",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "true",
            "EnableVideoColorTransformation" : "true"
        },
        "DefaultVariations" : [ "UnlitCommon" ],
        "InstancedArguments" : [ "instanceConstantsArray" ],
        "DebugMapping": "PbrDebug",
        "SupportsRuntimeFunctionConstants" : true,
        "PreloadOptions" : {
            "PixelFormat" : [115],
            "SampleCount" : [4],
            "OverrideFlags" : [0, 2]
        },
        "UseDynamicAttributeStride" : true
    },
    {
        "Name": "SurfaceShaderFadeOpaque",
        "InheritFromTechnique": "SurfaceShaderTransparent",
        "InheritState": true,
        "FunctionConstants" : {
            "EnableTransparency" : "false"
        }
    },
    {
        "Name": "SurfaceShaderDepthOnly",
        "VertexShader": {
            "Entry": "realitykit::vsGeometryModifier"
        },
        "PixelShader": {
            "Entry": "realitykit::fsSurfacePbr"
        },
        "State" : {
            "ColorWriteMask" : "None",
            "WriteDepth": true,
            "DepthCompareFunction": "Greater"
        },
        "FunctionConstants" : {
            "EnableBaseColorMap"    : "true",
            "EnableNormalMap"       : "true",
            "EnableEmissiveMap"     : "true",
            "EnableSeparateRMAS"    : "true",
            "EnableSingleRMAS"      : "false",
            "EnableRoughnessMap"    : "true",
            "EnableMetallicMap"     : "true",
            "EnableAOMap"           : "true",
            "EnableSpecularMap"     : "true",
            "EnableOpacityMap"      : "true",

            "VertexColorOption"      : "0",
            "EnableVertexColor"      : "true",
            "EnableMultiUVs"         : "true",

            "EnableSurfaceShaderColorDithering" : "false",
            "EnableGlow"             : "false",
            "PerceptualBlendingMode" : "0",
            "EnableNearFieldVignetting" : "false",
            "EnableBtMask"              : "false",

            "EnableTriPlanarVideoSupport" : "false",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "false",
            "EnableVideoColorTransformation" : "false"
        },
        "Variations" : {
            "EnableTriPlanarVideoSupport" : ["false", "true"],
            "ExperienceMode" : ["0", "1", "2"],
            "EnableVideoColorSpaceTransformation" : ["false", "true"],
            "EnableVideoColorTransformation" : ["false", "true"]
        },
        "RuntimeFunctionConstantDefaults" : {
            "EnableTriPlanarVideoSupport" : "true",
            "ExperienceMode" : "0",
            "EnableVideoColorSpaceTransformation" : "true",
            "EnableVideoColorTransformation" : "true"
        },
        "DefaultVariations" : [ "UnlitCommon" ],
        "InstancedArguments" : [ "instanceConstantsArray" ],
        "SupportsRuntimeFunctionConstants" : true,
        "UseDynamicAttributeStride" : true
    }],
    "ShaderCompilationMode" : {
        "Opaque" : 2,
        "OpaqueLite" : 2,
        "Transparent" : 2,
        "TransparentLite" : 2,
        "DepthOnly" : 2,
        "FadeOpaque" : 2,
        "FadeOpaqueLite" : 2
    }
}
