Class ShaderMaterial

ShaderMaterial class

A shader material allows to describe the material by external rendering engine or shader language. ShaderMaterial uses ShaderTechnique to describe the concrete rendering details, and the most suitable one will be used according to the final rendering platform. For example, your ShaderMaterial instance can have two technique, one is defined by HLSL, and another is defined by GLSL Under non-window platform the GLSL should be used instead of HLSL

public class ShaderMaterial : Material

Constructors

NameDescription
ShaderMaterial()Initializes a new instance of the ShaderMaterial class.
ShaderMaterial(string)Initializes a new instance of the ShaderMaterial class.

Properties

NameDescription
virtual Name { get; set; }Gets or sets the name.(Inherited from A3DObject.)
Properties { get; }Gets the collection of all properties.(Inherited from A3DObject.)
Techniques { get; }Gets all available techniques defined in this material.

Methods

NameDescription
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)(Inherited from A3DObject.)
GetEnumerator()Gets the enumerator to enumerate internal texture slots.(Inherited from Material.)
GetProperty(string)Get the value of specified property(Inherited from A3DObject.)
GetTexture(string)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name(Inherited from Material.)
RemoveProperty(Property)Removes a dynamic property.(Inherited from A3DObject.)
RemoveProperty(string)Remove the specified property identified by name(Inherited from A3DObject.)
SetProperty(string, object)Sets the value of specified property(Inherited from A3DObject.)
SetTexture(string, TextureBase)Sets the texture to specified slot(Inherited from Material.)
override ToString()Formats object to string(Inherited from Material.)

See Also