Package | away3d.materials.methods |
Class | public class CompositeDiffuseMethod |
Inheritance | CompositeDiffuseMethod BasicDiffuseMethod LightingMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | CelDiffuseMethod, LightMapDiffuseMethod, SubsurfaceScatteringDiffuseMethod |
Property | Defined By | ||
---|---|---|---|
alphaThreshold : Number [override]
The minimum alpha value for which pixels should be drawn. | CompositeDiffuseMethod | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
baseMethod : BasicDiffuseMethod
The base diffuse method on which this method's shading is based. | CompositeDiffuseMethod | ||
diffuseAlpha : Number [override]
The alpha component of the diffuse reflection. | CompositeDiffuseMethod | ||
diffuseColor : uint [override]
The color of the diffuse reflection when not using a texture. | CompositeDiffuseMethod | ||
id : String | NamedAssetBase | ||
name : String | NamedAssetBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
passes : Vector.<MaterialPassBase> [read-only]
Any passes required that render to a texture used by this method. | ShadingMethodBase | ||
texture : Texture2DBase [override]
The bitmapData to use to define the diffuse reflection color per texel. | CompositeDiffuseMethod | ||
_totalLightColorReg : ShaderRegisterElement | BasicDiffuseMethod |
Property | Defined By | ||
---|---|---|---|
_alphaThreshold : Number = 0 | BasicDiffuseMethod | ||
_baseMethod : BasicDiffuseMethod | CompositeDiffuseMethod | ||
_diffuseInputRegister : ShaderRegisterElement | BasicDiffuseMethod | ||
_isFirstLight : Boolean | BasicDiffuseMethod | ||
_passes : Vector.<MaterialPassBase> | ShadingMethodBase | ||
_shadowRegister : ShaderRegisterElement | BasicDiffuseMethod | ||
_sharedRegisters : ShaderRegisterData | ShadingMethodBase | ||
_useTexture : Boolean | BasicDiffuseMethod |
Method | Defined By | ||
---|---|---|---|
CompositeDiffuseMethod(modulateMethod:Function = null, baseDiffuseMethod:BasicDiffuseMethod = null)
Creates a new WrapDiffuseMethod object. | CompositeDiffuseMethod | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
copyFrom(method:ShadingMethodBase):void [override]
Copies the state from a ShadingMethodBase object into the current object. | BasicDiffuseMethod | ||
dispose():void [override]
Cleans up any resources used by the current object. | CompositeDiffuseMethod | ||
generateMip(stage3DProxy:Stage3DProxy):void
Forces the creation of the texture. | BasicDiffuseMethod | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
_baseMethod | property |
protected var _baseMethod:BasicDiffuseMethod
alphaThreshold | property |
alphaThreshold:Number
[override] 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
baseMethod | property |
baseMethod:BasicDiffuseMethod
The base diffuse method on which this method's shading is based.
public function get baseMethod():BasicDiffuseMethod
public function set baseMethod(value:BasicDiffuseMethod):void
diffuseAlpha | property |
diffuseAlpha:Number
[override] The alpha component of the diffuse reflection.
public function get diffuseAlpha():Number
public function set diffuseAlpha(value:Number):void
diffuseColor | property |
diffuseColor:uint
[override] The color of the diffuse reflection when not using a texture.
public function get diffuseColor():uint
public function set diffuseColor(value:uint):void
shadowRegister | property |
shadowRegister:ShaderRegisterElement
[write-only] [override] Set internally by the compiler, so the method knows the register containing the shadow calculation.
arcane function set shadowRegister(value:ShaderRegisterElement):void
sharedRegisters | property |
sharedRegisters:ShaderRegisterData
[override] The shared registers created by the compiler and possibly used by methods.
arcane function get sharedRegisters():ShaderRegisterData
arcane function set sharedRegisters(value:ShaderRegisterData):void
texture | property |
texture:Texture2DBase
[override] The bitmapData to use to define the diffuse reflection color per texel.
public function get texture():Texture2DBase
public function set texture(value:Texture2DBase):void
CompositeDiffuseMethod | () | Constructor |
public function CompositeDiffuseMethod(modulateMethod:Function = null, baseDiffuseMethod:BasicDiffuseMethod = null)
Creates a new WrapDiffuseMethod object.
ParametersmodulateMethod:Function (default = null ) — The method which will add the code to alter the base method's strength. It needs to have the signature clampDiffuse(t : ShaderRegisterElement, regCache : ShaderRegisterCache) : String, in which t.w will contain the diffuse strength.
| |
baseDiffuseMethod:BasicDiffuseMethod (default = null ) — The base diffuse method on which this method's shading is based.
|
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
cleanCompilationData | () | method |
override arcane function cleanCompilationData():void
deactivate | () | method |
override arcane function deactivate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Clears the render state for this method.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
stage3DProxy:Stage3DProxy — The Stage3DProxy object currently used for rendering.
|
dispose | () | method |
override public function dispose():void
Cleans up any resources used by the current object.
getFragmentCodePerLight | () | method |
override arcane function getFragmentCodePerLight(vo:MethodVO, lightDirReg:ShaderRegisterElement, lightColReg:ShaderRegisterElement, regCache:ShaderRegisterCache):String
Get the fragment shader code that will generate the code relevant to a single light.
Parameters
vo:MethodVO — The MethodVO object containing the method data for the currently compiled material pass.
| |
lightDirReg:ShaderRegisterElement — The register containing the light direction vector.
| |
lightColReg:ShaderRegisterElement — The register containing the light colour.
| |
regCache:ShaderRegisterCache — The register cache used during the compilation.
|
String |
getFragmentCodePerProbe | () | method |
override arcane function getFragmentCodePerProbe(vo:MethodVO, cubeMapReg:ShaderRegisterElement, weightRegister:String, regCache:ShaderRegisterCache):String
Get the fragment shader code that will generate the code relevant to a single light probe object.
Parameters
vo:MethodVO — The MethodVO object containing the method data for the currently compiled material pass.
| |
cubeMapReg:ShaderRegisterElement — The register containing the cube map for the current probe
| |
weightRegister:String — A string representation of the register + component containing the current weight
| |
regCache:ShaderRegisterCache — The register cache providing any necessary registers to the shader
|
String |
getFragmentPostLightingCode | () | method |
override arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache | |
targetReg:ShaderRegisterElement |
String |
getFragmentPreLightingCode | () | method |
override arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache |
String |
getVertexCode | () | method |
override arcane function getVertexCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache |
String |
initConstants | () | method |
override arcane function initConstants(vo:MethodVO):void
Initializes unchanging shader constants using the data from a MethodVO.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
|
initVO | () | method |
reset | () | method |
override arcane function reset():void
Resets the compilation state of the method.