Struct ShaderMaterial

A material that uses a custom Shader program.

struct ShaderMaterial ;

A material that uses a custom Shader program to render either items to screen or process particles. You can create multiple materials for the same shader but configure different values for the uniforms defined in the shader.

Properties

NameTypeDescription
shader[get, set] ShaderThe Shader program used to render this material.

Methods

NameDescription
_shaderChanged
getShader
getShaderParam Returns the current value set for this material of a uniform in the shader.
propertyCanRevert Returns true if the property identified by name can be reverted to a default value.
propertyGetRevert Returns the default value of the material property with given name.
setShader
setShaderParam Changes the value set for this material of a uniform in the shader. Note: param must match the name of the uniform in the code exactly.