Class Material

A shaded material for geometry encapsulating its Shaders, graphics pipeline state, and optionally a Texture.

class Material
  : ObservableFileCollection
  , IResource ;

Constructors

NameDescription
this (shaders, depthTest) Initialize a new Material.
this (shaders, texture, frontFace, cullMode, depthTest) Initialize a new textured Material.
this (name, shaders, frontFace, cullMode, depthTest) Initialize a new named Material.
this (name, shaders, texture, frontFace, cullMode, depthTest) Initialize a new named and textured Material.

Properties

NameTypeDescription
cullMode[get] CullModeType of face culling to use during graphic pipeline rasterization.
depthTest[get] boolWhether to perform the depth test. If true, assumes the render target has a depth buffer attachment.
dirtied[get] const(MaterialDirtied)The properties of this Material that have changed.
dirty[get] boolWhether this Material has changed and requires reprocessing into the graphics pipeline.
frontFace[get] FrontFaceSpecifies the vertex order for faces to be considered front-facing.
initialized[get] boolWhether this Shader has been successfully initialized.
texture[get] TextureWhether this Material is textured.
textured[get] boolWhether this Material is textured.

Methods

NameDescription
initialize (device) Initialize this Material.
toHash () Pipelines are keyed on Materials, MeshBase.bindingDescription, MeshBase.attributeDescriptions, and MeshBase.topology

See Also

PipelinePreparer