class MaterialBase
package away3d.materials
extends NamedAssetBase
implements IAsset
extended by MultiPassMaterialBase, OrthoSegmentMaterial, SegmentMaterial, SinglePassMaterialBase, SkyBoxMaterial
Available on all platforms
MaterialBase forms an abstract base class for any material. A material consists of several passes, each of which constitutes at least one render call. Several passes could be used for special effects (render lighting for many lights in several passes, render an outline in a separate pass) or to provide additional render-to-texture passes (rendering diffuse light to texture for texture-space subsurface scattering, or rendering a depth map for specialized self-shadowing).
Away3D provides default materials trough SinglePassMaterialBase and MultiPassMaterialBase, which use modular methods to build the shader code. MaterialBase can be extended to build specific and high-performant custom shaders, or entire new material frameworks.
Constructor
Variables
Methods
dispose():Void
Cleans up resources owned by the material, including passes. Textures are not owned by the material since they could be used by other materials and will not be disposed.