{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Shader Build-Chain Definition Schema",
    "type": "object",
    "required": [
        "FXCPath",
        "OutputDirectory",
        "ShadersToCompile"
    ],
    "properties": {
        "FXCPath": {
            "description": "The path to fxc.exe",
            "type": "string"
        },
        "AdditionalIncludeDirectories": {
            "description": "Additional directories for the shader to use as search directories when resolving #includes",
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "ShadersToCompile": {
            "description": "The shaders to compile",
            "type": "array",
            "items": {
                "$ref": "#/definitions/Shader"
            }
        }
    },
    "definitions": {
        "Shader": {
            "description": "A shader to compile",
            "type": "object",
            "required": [
                "InputFilePath",
                "EntryPointName",
                "ShaderType"
            ],
            "properties": {
                "InputFilePath": {
                    "description": "The file to compile",
                    "type": "string"
                },
                "OutputFilePath": {
                    "description": "The path to save the output file to. This is underneath OutputDirectory",
                    "type": "string"
                },
                "EntryPointName": {
                    "description": "The name of the entry point function in the shader",
                    "type": "string"
                },
                "ShaderType": {
                    "description": "The type of shader",
                    "enum": [
                        "vertex",
                        "pixel",
                        "geometry",
                        "hull",
                        "domain",
                        "compute"
                    ]
                },
                "ShaderModel": {
                    "description": "The shader model to compile against",
                    "enum": [
                        "2.0",
                        "3.0",
                        "4.0",
                        "4.1",
                        "5.0"
                    ]
                },
                "AdditionalIncludes": {
                    "description": "Any additional files to be included before the content of the input file",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "Pre-ProcessorDefines": {
                    "description": "Any #defines to be used for the input file",
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            }
        }
    }
}