Skip to main content

Shader Context

Asset ID:shader_context

A standalone data object descriptor, shaped like a shader's material/node data descriptor, usable outside of a shader

Asset schema properties

uuid

uuid

Unique identifier for the asset

name

string

Name of the asset

dataDescriptor

array[object]

The fields every shader in this family reads as input

Parameter descriptor

name

string

Parameter name

bufferProperties

object

{

elementCount,

elementSize,

usage,

}

Additional properties for a parameter of type "buffer": how many elements it holds, the size of each element, and how the buffer is used. Absent for every other parameter type

categories

array[string]

Categories

default

numberbooleanarray[number]

Parameter default value

isReferenceResource

boolean

Default:false

Whether this parameter (a render target or buffer) is the resource used to compute the number of dispatched workgroups for a compute shader, i.e. DispatchedGroups = referenceResource.size / workgroupSize (see compute_shader_size_reference's reference_resource)

nativeType

Parameter native type

offset

uint32

Parameter offset in bytes

properties

object

{

format,

openMode,

spec,

}

Additional properties gating this parameter's relevance and/or driving how it's interpreted by tooling (e.g. the material editor)

type

Parameter type

outputDescriptor

array[object]

The fields a material shader must produce.

Output field descriptor

name

string

Field name

blendState

object

{

alphaBlendOp,

blendEnable,

colorBlendOp,

colorWriteMask,

dstAlphaBlendFactor,

dstColorBlendFactor,

srcAlphaBlendFactor,

srcColorBlendFactor,

}

Blend state of the attachment, no blending if absent

description

string

What this field represents

type

Field data type