material

 

Tag: material
Parent tag: pass
Attributes:

  • name (string) – the name of a defined material.
  • fromLibrary (string) – the name of the library where the material is defined.
  • dimX (int) – the number of groups in the X dimension.
  • dimY (int) – the number of groups in the Y dimension.
  • dimZ (int) – the number of groups in the Z dimension.

Child tags (none)

Note: this tag is only valid when the pass class is “compute” or “quad”.

When used in a pass “compute” the material must have a compute shader associated with it. The dimensions must be non-zero natural numbers.

When used in a pass “quad” the attributes dimX, dimY, and dimZ, are not read. In this case the material is used to render the quad.

Example in a pass “compute”:

<material name="computeShader" fromLibrary="Compute" dimX=64, dimY=64 dimZ=1 />

Example in a pass “quad”:

<material name="deferredPhong" fromLibrary="Shading" />