Package | away3d.materials |
Class | public class SinglePassMaterialBase |
Inheritance | SinglePassMaterialBase MaterialBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | ColorMaterial, TextureMaterial |
Property | Defined By | ||
---|---|---|---|
alphaBlending : Boolean
Indicates whether or not the material has transparency. | SinglePassMaterialBase | ||
alphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have
already been premultiplied. | MaterialBase | ||
alphaThreshold : Number
The minimum alpha value for which pixels should be drawn. | SinglePassMaterialBase | ||
ambient : Number
The strength of the ambient reflection. | SinglePassMaterialBase | ||
ambientColor : uint
The colour of the ambient reflection. | SinglePassMaterialBase | ||
ambientMethod : BasicAmbientMethod
The method that provides the ambient lighting contribution. | SinglePassMaterialBase | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
assetType : String [read-only]
The type of the asset. | MaterialBase | ||
blendMode : String [override]
The blend mode to use when drawing this renderable. | SinglePassMaterialBase | ||
bothSides : Boolean
Defines whether or not the material should cull triangles facing away from the camera. | MaterialBase | ||
colorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with. | SinglePassMaterialBase | ||
depthCompareMode : String [override]
The depth compare mode used to render the renderables using this material. | SinglePassMaterialBase | ||
diffuseLightSources : uint
Define which light source types to use for diffuse reflections. | SinglePassMaterialBase | ||
diffuseMethod : BasicDiffuseMethod
The method that provides the diffuse lighting contribution. | SinglePassMaterialBase | ||
enableLightFallOff : Boolean
Whether or not to use fallOff and radius properties for lights. | SinglePassMaterialBase | ||
extra : Object
An object to contain any extra data. | MaterialBase | ||
gloss : Number
The glossiness of the material (sharpness of the specular highlight). | SinglePassMaterialBase | ||
id : String | NamedAssetBase | ||
lightPicker : LightPickerBase [override]
The light picker used by the material to provide lights to the material if it supports lighting. | SinglePassMaterialBase | ||
mipmap : Boolean [override]
Indicates whether or not any used textures should use mipmapping. | SinglePassMaterialBase | ||
name : String | NamedAssetBase | ||
normalMap : Texture2DBase
The normal map to modulate the direction of the surface for each texel. | SinglePassMaterialBase | ||
normalMethod : BasicNormalMethod
The method used to generate the per-pixel normals. | SinglePassMaterialBase | ||
numMethods : int [read-only]
The number of "effect" methods added to the material. | SinglePassMaterialBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
repeat : Boolean
Indicates whether or not any used textures should be tiled. | MaterialBase | ||
requiresBlending : Boolean [override] [read-only]
Indicates whether or not the material requires alpha blending during rendering. | SinglePassMaterialBase | ||
shadowMethod : ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. | SinglePassMaterialBase | ||
smooth : Boolean
Indicates whether or not any used textures should use smoothing. | MaterialBase | ||
specular : Number
The overall strength of the specular reflection. | SinglePassMaterialBase | ||
specularColor : uint
The colour of the specular reflection. | SinglePassMaterialBase | ||
specularLightSources : uint
Define which light source types to use for specular reflections. | SinglePassMaterialBase | ||
specularMap : Texture2DBase
A specular map that defines the strength of specular reflections for each texel in the red channel,
and the gloss factor in the green channel. | SinglePassMaterialBase | ||
specularMethod : BasicSpecularMethod
The method that provides the specular lighting contribution. | SinglePassMaterialBase | ||
uniqueId : uint [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. | MaterialBase |
Property | Defined By | ||
---|---|---|---|
_depthPass : DepthMapPass | MaterialBase | ||
_distancePass : DistanceMapPass | MaterialBase | ||
_lightPicker : LightPickerBase | MaterialBase | ||
_mipmap : Boolean = true | MaterialBase | ||
_numPasses : uint | MaterialBase | ||
_passes : Vector.<MaterialPassBase> | MaterialBase | ||
_repeat : Boolean | MaterialBase | ||
_screenPass : SuperShaderPass | SinglePassMaterialBase | ||
_smooth : Boolean = true | MaterialBase |
Method | Defined By | ||
---|---|---|---|
Creates a new SinglePassMaterialBase object. | SinglePassMaterialBase | ||
addMethod(method:EffectMethodBase):void
Appends an "effect" shading method to the shader. | SinglePassMaterialBase | ||
addMethodAt(method:EffectMethodBase, index:int):void
Adds an effect method at the specified index amongst the methods already added to the material. | SinglePassMaterialBase | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
dispose():void
Cleans up resources owned by the material, including passes. | MaterialBase | ||
getMethodAt(index:int):EffectMethodBase
Returns the method added at the given index. | SinglePassMaterialBase | ||
hasMethod(method:EffectMethodBase):Boolean
Queries whether a given effect method was added to the material. | SinglePassMaterialBase | ||
removeMethod(method:EffectMethodBase):void
Removes an effect method from the material. | SinglePassMaterialBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
_screenPass | property |
protected var _screenPass:SuperShaderPass
alphaBlending | property |
alphaBlending:Boolean
Indicates whether or not the material has transparency. If binary transparency is sufficient, for example when using textures of foliage, consider using alphaThreshold instead.
public function get alphaBlending():Boolean
public function set alphaBlending(value:Boolean):void
alphaThreshold | property |
alphaThreshold:Number
The minimum alpha value for which pixels should be drawn. This is used for transparency that is either invisible or entirely opaque, often used with textures for foliage, etc. Recommended values are 0 to disable alpha, or 0.5 to create smooth edges. Default value is 0 (disabled).
public function get alphaThreshold():Number
public function set alphaThreshold(value:Number):void
ambient | property |
ambient:Number
The strength of the ambient reflection.
public function get ambient():Number
public function set ambient(value:Number):void
ambientColor | property |
ambientColor:uint
The colour of the ambient reflection.
public function get ambientColor():uint
public function set ambientColor(value:uint):void
ambientMethod | property |
ambientMethod:BasicAmbientMethod
The method that provides the ambient lighting contribution. Defaults to BasicAmbientMethod.
public function get ambientMethod():BasicAmbientMethod
public function set ambientMethod(value:BasicAmbientMethod):void
blendMode | property |
blendMode:String
[override] The blend mode to use when drawing this renderable. The following blend modes are supported:
public function get blendMode():String
public function set blendMode(value:String):void
colorTransform | property |
colorTransform:ColorTransform
The ColorTransform object to transform the colour of the material with. Defaults to null.
public function get colorTransform():ColorTransform
public function set colorTransform(value:ColorTransform):void
depthCompareMode | property |
depthCompareMode:String
[override] The depth compare mode used to render the renderables using this material.
public function get depthCompareMode():String
public function set depthCompareMode(value:String):void
diffuseLightSources | property |
diffuseLightSources:uint
Define which light source types to use for diffuse reflections. This allows choosing between regular lights and/or light probes for diffuse reflections.
public function get diffuseLightSources():uint
public function set diffuseLightSources(value:uint):void
See also
diffuseMethod | property |
diffuseMethod:BasicDiffuseMethod
The method that provides the diffuse lighting contribution. Defaults to BasicDiffuseMethod.
public function get diffuseMethod():BasicDiffuseMethod
public function set diffuseMethod(value:BasicDiffuseMethod):void
enableLightFallOff | property |
enableLightFallOff:Boolean
Whether or not to use fallOff and radius properties for lights. This can be used to improve performance and compatibility for constrained mode.
public function get enableLightFallOff():Boolean
public function set enableLightFallOff(value:Boolean):void
gloss | property |
gloss:Number
The glossiness of the material (sharpness of the specular highlight).
public function get gloss():Number
public function set gloss(value:Number):void
lightPicker | property |
lightPicker:LightPickerBase
[override] The light picker used by the material to provide lights to the material if it supports lighting.
public function get lightPicker():LightPickerBase
public function set lightPicker(value:LightPickerBase):void
mipmap | property |
mipmap:Boolean
[override] Indicates whether or not any used textures should use mipmapping. Defaults to true.
public function get mipmap():Boolean
public function set mipmap(value:Boolean):void
normalMap | property |
normalMap:Texture2DBase
The normal map to modulate the direction of the surface for each texel. The default normal method expects tangent-space normal maps, but others could expect object-space maps.
public function get normalMap():Texture2DBase
public function set normalMap(value:Texture2DBase):void
normalMethod | property |
normalMethod:BasicNormalMethod
The method used to generate the per-pixel normals. Defaults to BasicNormalMethod.
public function get normalMethod():BasicNormalMethod
public function set normalMethod(value:BasicNormalMethod):void
numMethods | property |
numMethods:int
[read-only] The number of "effect" methods added to the material.
public function get numMethods():int
requiresBlending | property |
requiresBlending:Boolean
[read-only] [override] Indicates whether or not the material requires alpha blending during rendering.
public function get requiresBlending():Boolean
shadowMethod | property |
shadowMethod:ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. Defaults to null.
public function get shadowMethod():ShadowMapMethodBase
public function set shadowMethod(value:ShadowMapMethodBase):void
specular | property |
specular:Number
The overall strength of the specular reflection.
public function get specular():Number
public function set specular(value:Number):void
specularColor | property |
specularColor:uint
The colour of the specular reflection.
public function get specularColor():uint
public function set specularColor(value:uint):void
specularLightSources | property |
specularLightSources:uint
Define which light source types to use for specular reflections. This allows choosing between regular lights and/or light probes for specular reflections.
public function get specularLightSources():uint
public function set specularLightSources(value:uint):void
See also
specularMap | property |
specularMap:Texture2DBase
A specular map that defines the strength of specular reflections for each texel in the red channel, and the gloss factor in the green channel. You can use SpecularBitmapTexture if you want to easily set specular and gloss maps from grayscale images, but correctly authored images are preferred.
public function get specularMap():Texture2DBase
public function set specularMap(value:Texture2DBase):void
specularMethod | property |
specularMethod:BasicSpecularMethod
The method that provides the specular lighting contribution. Defaults to BasicSpecularMethod.
public function get specularMethod():BasicSpecularMethod
public function set specularMethod(value:BasicSpecularMethod):void
SinglePassMaterialBase | () | Constructor |
public function SinglePassMaterialBase()
Creates a new SinglePassMaterialBase object.
activateForDepth | () | method |
override arcane function activateForDepth(stage3DProxy:Stage3DProxy, camera:Camera3D, distanceBased:Boolean = false):void
Parameters
stage3DProxy:Stage3DProxy | |
camera:Camera3D | |
distanceBased:Boolean (default = false )
|
addMethod | () | method |
public function addMethod(method:EffectMethodBase):void
Appends an "effect" shading method to the shader. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods added prior.
Parameters
method:EffectMethodBase |
addMethodAt | () | method |
public function addMethodAt(method:EffectMethodBase, index:int):void
Adds an effect method at the specified index amongst the methods already added to the material. Effect methods are those that do not influence the lighting but modulate the shaded colour, used for fog, outlines, etc. The method will be applied to the result of the methods with a lower index.
Parameters
method:EffectMethodBase | |
index:int |
getMethodAt | () | method |
public function getMethodAt(index:int):EffectMethodBase
Returns the method added at the given index.
Parameters
index:int — The index of the method to retrieve.
|
EffectMethodBase — The method at the given index.
|
hasMethod | () | method |
public function hasMethod(method:EffectMethodBase):Boolean
Queries whether a given effect method was added to the material.
Parameters
method:EffectMethodBase — The method to be queried.
|
Boolean — true if the method was added to the material, false otherwise.
|
removeMethod | () | method |
public function removeMethod(method:EffectMethodBase):void
Removes an effect method from the material.
Parameters
method:EffectMethodBase — The method to be removed.
|
updateMaterial | () | method |
override arcane function updateMaterial(context:Context3D):void
Parameters
context:Context3D |