Skip to content

Options and conditions ​

Behavior and constraints ​

An option's id/type/default/impact is authoritative; name/description are presentation. Types are boolean, integer, number and string. Defaults and overrides must match the type and satisfy min/max or allowed. A JSON boolean is not an integer; string enum values are case-sensitive. See the full Schema for valid range/allowed combinations. An omitted bound is not zero.

impact is uniform, program, pipeline or resources and declares the invalidation domain. It does not guarantee that a change can always avoid compilation: data, defines, resources and active branches still need validation. UI cannot redefine the type, hard bounds, default or impact.

Pass enabled is explicit. enabledWhen and binding/semantic/service conditions reference an option with equals or oneOf. Values must satisfy the referenced option's type and bounds; condition arrays jointly constrain activity. Settings UI has a separate equals/notEquals/in contract.

Analyze the same options/capabilities intended for runtime. After disabling a Pass, inspect the active Program, Resource, Service and ordering closure. A declared node retained in a graph does not prove allocation. Invalid conditions and dependencies fail loading/resolution rather than being hidden by execution-time skipping.

Generated v5 structure ​

Required applies to the displayed object/branch. Absence of a Schema default does not establish a runtime default. Conditional rules remain in the complete definition below; Loader validation also resolves IDs, ownership, budgets and device limits.

option · v5 ​

Field / branchPresence in this objectStructural constraints
allowedoptional heretype="array"; minItems=1; uniqueItems=true; items=#/$defs/optionScalar
defaultrequired$ref="#/$defs/optionScalar"
descriptionoptional heretype="string"
idrequired$ref="#/$defs/identifier"
impactrequiredtype="array"; uniqueItems=true
maxoptional heretype="number"
minoptional heretype="number"
nameoptional heretype="string"
typerequiredenum=["boolean","integer","number","string"]
Full structural rule: #/$defs/option
json
{
  "additionalProperties": false,
  "allOf": [
    {
      "if": {
        "properties": {
          "type": {
            "const": "boolean"
          }
        },
        "required": [
          "type"
        ]
      },
      "then": {
        "properties": {
          "allowed": {
            "items": {
              "type": "boolean"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "default": {
            "type": "boolean"
          },
          "max": {
            "not": {}
          },
          "min": {
            "not": {}
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "integer"
          }
        },
        "required": [
          "type"
        ]
      },
      "then": {
        "properties": {
          "allowed": {
            "items": {
              "type": "integer"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "default": {
            "type": "integer"
          },
          "max": {
            "type": "integer"
          },
          "min": {
            "type": "integer"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "number"
          }
        },
        "required": [
          "type"
        ]
      },
      "then": {
        "properties": {
          "allowed": {
            "items": {
              "type": "number"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "default": {
            "type": "number"
          },
          "max": {
            "type": "number"
          },
          "min": {
            "type": "number"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "string"
          }
        },
        "required": [
          "type"
        ]
      },
      "then": {
        "properties": {
          "allowed": {
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "uniqueItems": true
          },
          "default": {
            "type": "string"
          },
          "max": {
            "not": {}
          },
          "min": {
            "not": {}
          }
        }
      }
    },
    {
      "not": {
        "required": [
          "allowed",
          "min"
        ]
      }
    },
    {
      "not": {
        "required": [
          "allowed",
          "max"
        ]
      }
    },
    {
      "oneOf": [
        {
          "required": [
            "min",
            "max"
          ]
        },
        {
          "not": {
            "anyOf": [
              {
                "required": [
                  "min"
                ]
              },
              {
                "required": [
                  "max"
                ]
              }
            ]
          }
        }
      ]
    }
  ],
  "properties": {
    "allowed": {
      "items": {
        "$ref": "#/$defs/optionScalar"
      },
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "default": {
      "$ref": "#/$defs/optionScalar"
    },
    "description": {
      "type": "string"
    },
    "id": {
      "$ref": "#/$defs/identifier"
    },
    "impact": {
      "items": {
        "enum": [
          "uniform",
          "program",
          "pipeline",
          "resources"
        ]
      },
      "type": "array",
      "uniqueItems": true
    },
    "max": {
      "type": "number"
    },
    "min": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "type": {
      "enum": [
        "boolean",
        "integer",
        "number",
        "string"
      ]
    }
  },
  "required": [
    "id",
    "type",
    "default",
    "impact"
  ],
  "type": "object"
}

optionScalar · v5 ​

type=["boolean","integer","number","string"]

Full structural rule: #/$defs/optionScalar
json
{
  "type": [
    "boolean",
    "integer",
    "number",
    "string"
  ]
}

condition · v5 ​

Field / branchPresence in this objectStructural constraints
equalsoptional here$ref="#/$defs/optionScalar"
oneOfoptional heretype="array"; minItems=1; uniqueItems=true; items=#/$defs/optionScalar
optionrequired$ref="#/$defs/identifier"
Full structural rule: #/$defs/condition
json
{
  "additionalProperties": false,
  "allOf": [
    {
      "oneOf": [
        {
          "required": [
            "equals"
          ]
        },
        {
          "required": [
            "oneOf"
          ]
        }
      ]
    }
  ],
  "properties": {
    "equals": {
      "$ref": "#/$defs/optionScalar"
    },
    "oneOf": {
      "items": {
        "$ref": "#/$defs/optionScalar"
      },
      "minItems": 1,
      "type": "array",
      "uniqueItems": true
    },
    "option": {
      "$ref": "#/$defs/identifier"
    }
  },
  "required": [
    "option"
  ],
  "type": "object"
}

Complete examples ​

Sources and machine records ​

Coverage inventory · Schema v5 · Catalog v2 · Completion v2

schema-v3 · schema-v4 · schema-v5 · completion-v1 · completion-v2 · temporal · settings-guide ·

ShaderPackManifestLoader.cs

Author documentation · Manifest v5 / Scene ABI v2