Programs and shader sources
Behavior and constraints
graphics supplies vertex/fragment; compute supplies compute. Stage files cannot be mixed. Pass programs and command program reference the ID, and invocation Programs must be visible to their Pass. Sources, includes, defines, option/capability inputs and compile context form a frozen closure. Files edited later cannot mutate a queued candidate.
compileMode is legacyCustom, officialCompatible or manifestDriven. Check the resolved host/Program context for defaults and restrictions; an accepted token does not imply support on every host. officialCompatible follows published host vertex/macro conventions, including Terrain semantic comments and OPENGL_POSITION_FIX. Pack includes cannot cross into the BuiltIn owner. The materials virtual include is an explicit ABI entry, not arbitrary built-in file access.
defines accepts fixed values or option/capability maps; variants supplies IDs and define sets. Mapping and null behavior follow Schema/resolver rules without executing author code. Uniforms, blocks, vertex inputs and fragment outputs must agree with bindings, sceneBindings, targets and drawBuffers.
Program bindings/targets/drawBuffers/state/engineDrawState describe their supported invocation boundary. Check command-owned invocation metadata in the resolved result; duplicated declarations do not imply automatic merging of every owner. Static reflection may lack compilation context. A frozen source closure alone does not prove driver compilation or an executable generation.
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.
program · v5
| Field / branch | Presence in this object | Structural constraints |
|---|---|---|
bindings | optional here | — |
compileMode | optional here | enum=["legacyCustom","officialCompatible","manifestDriven"] |
compute | optional here | $ref="#/$defs/relativePath" |
defines | optional here | type="object"; additionalProperties={"$ref":"#/$defs/defineValue"} |
drawBuffers | optional here | — |
engineDrawState | optional here | — |
fragment | optional here | $ref="#/$defs/relativePath" |
id | required | $ref="#/$defs/identifier" |
kind | required | enum=["graphics","compute"] |
state | optional here | — |
targets | optional here | — |
variants | optional here | type="array"; items=#/$defs/variant |
vertex | optional here | $ref="#/$defs/relativePath" |
Full structural rule: #/$defs/program
{
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"kind": {
"const": "graphics"
}
},
"required": [
"kind"
]
},
"then": {
"allOf": [
{
"not": {
"anyOf": [
{
"required": [
"compute"
]
}
]
}
}
],
"required": [
"vertex",
"fragment"
]
}
},
{
"if": {
"properties": {
"kind": {
"const": "compute"
}
},
"required": [
"kind"
]
},
"then": {
"allOf": [
{
"not": {
"anyOf": [
{
"required": [
"vertex"
]
},
{
"required": [
"fragment"
]
},
{
"required": [
"compileMode"
]
}
]
}
}
],
"required": [
"compute"
]
}
}
],
"properties": {
"bindings": {
"not": {}
},
"compileMode": {
"enum": [
"legacyCustom",
"officialCompatible",
"manifestDriven"
]
},
"compute": {
"$ref": "#/$defs/relativePath"
},
"defines": {
"additionalProperties": {
"$ref": "#/$defs/defineValue"
},
"propertyNames": {
"$ref": "#/$defs/glslIdentifier"
},
"type": "object"
},
"drawBuffers": {
"not": {}
},
"engineDrawState": {
"not": {}
},
"fragment": {
"$ref": "#/$defs/relativePath"
},
"id": {
"$ref": "#/$defs/identifier"
},
"kind": {
"enum": [
"graphics",
"compute"
]
},
"state": {
"not": {}
},
"targets": {
"not": {}
},
"variants": {
"items": {
"$ref": "#/$defs/variant"
},
"type": "array"
},
"vertex": {
"$ref": "#/$defs/relativePath"
}
},
"required": [
"id",
"kind"
],
"type": "object"
}variant · v5
| Field / branch | Presence in this object | Structural constraints |
|---|---|---|
defines | required | type="object"; additionalProperties={"$ref":"#/$defs/defineValue"} |
id | required | $ref="#/$defs/identifier" |
Full structural rule: #/$defs/variant
{
"additionalProperties": false,
"properties": {
"defines": {
"additionalProperties": {
"$ref": "#/$defs/defineValue"
},
"propertyNames": {
"$ref": "#/$defs/glslIdentifier"
},
"type": "object"
},
"id": {
"$ref": "#/$defs/identifier"
}
},
"required": [
"id",
"defines"
],
"type": "object"
}defineValue · v5
oneOf: 2
Full structural rule: #/$defs/defineValue
{
"oneOf": [
{
"$ref": "#/$defs/nullableDefineValue"
},
{
"$ref": "#/$defs/defineBinding"
}
]
}defineBinding · v5
| Field / branch | Presence in this object | Structural constraints |
|---|---|---|
capability | optional here | $ref="#/$defs/identifier" |
map | optional here | type="object"; additionalProperties={"$ref":"#/$defs/nullableDefineValue"} |
option | optional here | $ref="#/$defs/identifier" |
Full structural rule: #/$defs/defineBinding
{
"additionalProperties": false,
"allOf": [
{
"oneOf": [
{
"required": [
"option"
]
},
{
"required": [
"capability"
]
}
]
}
],
"properties": {
"capability": {
"$ref": "#/$defs/identifier"
},
"map": {
"additionalProperties": {
"$ref": "#/$defs/nullableDefineValue"
},
"type": "object"
},
"option": {
"$ref": "#/$defs/identifier"
}
},
"type": "object"
}nullableDefineValue · v5
type=["string","boolean","integer","number","null"]
Full structural rule: #/$defs/nullableDefineValue
{
"type": [
"string",
"boolean",
"integer",
"number",
"null"
]
}glslIdentifier · v5
type="string"; pattern="^[A-Za-z_][A-Za-z0-9_]*$"
Full structural rule: #/$defs/glslIdentifier
{
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"type": "string"
}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 ·