{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Halfling Model File Definition Schema",
    "type": "object",
    "required": [
        "SubsetMaterialDefinitions"
    ],
    "properties": {
        "GenNormals": {
            "description": "Post-processing can automatically calculate the mesh normals. If normals already exist, setting GenNormals to true will do nothing",
            "type": "boolean"
        },
        "CalcTangents": {
            "description": "Post-processing can automatically calculate the mesh tangents. If tangents already exist, setting CalcTangents to true will do nothing",
            "type": "boolean"
        },
        "VertexBufferUsage": {
            "description": "The usage type for the VertexBuffer",
            "enum": [
                "default",
                "immutable",
                "dynamic",
                "staging"
            ]
        },
        "IndexBufferUsage": {
            "description": "The usage type for the IndexBuffer",
            "enum": [
                "default",
                "immutable",
                "dynamic",
                "staging"
            ]
        },
        "MaterialDefinitions": {
            "description": "The list of all the material definitions for each subset of the model",
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "MaterialName": {
                        "description": "The name of the subset. This is usually extracted from the source model file",
                        "type": "string"
                    },
                    "HMATFilePath": {
                        "description": "The file path to the *.hmat file for the material",
                        "type": "string"
                    },
                    "TextureDefinitions": {
                        "description": "The textures used in the shader. ORDER MATTERS!! They will be fed to the shader in the order that they are specified here",
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "FilePath": {
                                    "description": "The file path to the texture",
                                    "type": "string"
                                },
                                "Sampler": {
                                    "description": "The sampler to use with the texture",
                                    "enum": [
                                        "linear_clamp",
                                        "linear_border",
                                        "linear_wrap",
                                        "point_clamp",
                                        "point_wrap",
                                        "anisotropic_wrap"
                                    ]
                                }
                            }
                        }
                    }
                },
                "minItems": 1,
                "additionalItems": false
            }
        }
    }
}