MaterialBase forms an abstract base object 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.


Inherited from NamedAssetBase -> EventDispatcher


Created MaterialBase object has properties:

alphaPremultiplied

Boolean. Indicates whether visible textures (or other pixels) used by this material have already been premultiplied.

assetType

String. [read-only] The type of the asset.

blendMode

(BlendMode) The blend mode to use when drawing this renderable.

bothSides

Boolean. Defines whether or not the material should cull triangles facing away from the camera.

depthCompareMode

(Context3DCompareMode) The depth compare mode used to render the renderables using this material.

extra

An object to contain any extra data.

lightPicker

The light picker used by the material to provide lights to the material if it supports lighting. (LightPickerBase)

mipmap

Boolean. Indicates whether or not any used textures should use mipmapping.

repeat

Boolean. Indicates whether or not any used textures should be tiled.

requiresBlending

Boolean. [read-only] Indicates whether or not the material requires alpha blending during rendering.

smooth

Boolean. Indicates whether or not any used textures should use smoothing.

uniqueId

Int. [read-only] An id for this material used to sort the renderables by material, which reduces render state changes across materials using the same Program3D.


methods:

dispose()

Cleans up resources owned by the material, including passes.



Created with the Personal Edition of HelpNDoc: Free HTML Help documentation generator