Packageaway3d.materials.methods
Classpublic class CompositeDiffuseMethod
InheritanceCompositeDiffuseMethod Inheritance BasicDiffuseMethod Inheritance LightingMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses CelDiffuseMethod, LightMapDiffuseMethod, SubsurfaceScatteringDiffuseMethod

CompositeDiffuseMethod provides a base class for diffuse methods that wrap a diffuse method to alter the strength of its calculated strength.



Public Properties
 PropertyDefined By
  alphaThreshold : Number
[override]
CompositeDiffuseMethod
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : 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
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : 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
 Inherited_totalLightColorReg : ShaderRegisterElement
BasicDiffuseMethod
Protected Properties
 PropertyDefined By
 Inherited_alphaThreshold : Number = 0
BasicDiffuseMethod
  _baseMethod : BasicDiffuseMethod
CompositeDiffuseMethod
 Inherited_diffuseInputRegister : ShaderRegisterElement
BasicDiffuseMethod
 Inherited_isFirstLight : Boolean
BasicDiffuseMethod
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_shadowRegister : ShaderRegisterElement
BasicDiffuseMethod
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
 Inherited_useTexture : Boolean
BasicDiffuseMethod
Public Methods
 MethodDefined By
  
CompositeDiffuseMethod(modulateMethod:Function = null, baseDiffuseMethod:BasicDiffuseMethod = null)
Creates a new WrapDiffuseMethod object.
CompositeDiffuseMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Copies the state from a BasicDiffuseMethod object into the current object.
BasicDiffuseMethod
  
dispose():void
[override] Cleans up any resources used by the current object.
CompositeDiffuseMethod
 Inherited
generateMip(stage3DProxy:Stage3DProxy):void
BasicDiffuseMethod
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
BasicDiffuseMethod
 Inherited
getTex2DSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null, forceWrap:String = null):String
A helper method that generates standard code for sampling from a texture using the normal uv coordinates.
ShadingMethodBase
 Inherited
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_baseMethodproperty
protected var _baseMethod:BasicDiffuseMethod

alphaThresholdproperty 
alphaThreshold:Number[override]


Implementation
    public function get alphaThreshold():Number
    public function set alphaThreshold(value:Number):void
baseMethodproperty 
baseMethod:BasicDiffuseMethod

The base diffuse method on which this method's shading is based.


Implementation
    public function get baseMethod():BasicDiffuseMethod
    public function set baseMethod(value:BasicDiffuseMethod):void
diffuseAlphaproperty 
diffuseAlpha:Number[override]

The alpha component of the diffuse reflection.


Implementation
    public function get diffuseAlpha():Number
    public function set diffuseAlpha(value:Number):void
diffuseColorproperty 
diffuseColor:uint[override]

The color of the diffuse reflection when not using a texture.


Implementation
    public function get diffuseColor():uint
    public function set diffuseColor(value:uint):void
shadowRegisterproperty 
shadowRegister:ShaderRegisterElement  [write-only] [override]


Implementation
    arcane function set shadowRegister(value:ShaderRegisterElement):void
sharedRegistersproperty 
sharedRegisters:ShaderRegisterData[override]


Implementation
    arcane function get sharedRegisters():ShaderRegisterData
    arcane function set sharedRegisters(value:ShaderRegisterData):void
textureproperty 
texture:Texture2DBase[override]

The bitmapData to use to define the diffuse reflection color per texel.


Implementation
    public function get texture():Texture2DBase
    public function set texture(value:Texture2DBase):void
Constructor Detail
CompositeDiffuseMethod()Constructor
public function CompositeDiffuseMethod(modulateMethod:Function = null, baseDiffuseMethod:BasicDiffuseMethod = null)

Creates a new WrapDiffuseMethod object.

Parameters
modulateMethod: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.
Method Detail
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

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

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
 
lightDirReg:ShaderRegisterElement
 
lightColReg:ShaderRegisterElement
 
regCache:ShaderRegisterCache

Returns
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 register containing the cube map for the current probe
 
cubeMapReg:ShaderRegisterElement — A string representation of the register + component containing the current weight
 
weightRegister:String — The register cache providing any necessary registers to the shader
 
regCache:ShaderRegisterCache

Returns
String
getFragmentPostLightingCode()method 
override arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
getFragmentPreLightingCode()method 
override arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache

Returns
String
getVertexCode()method 
override arcane function getVertexCode(vo:MethodVO, regCache:ShaderRegisterCache):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache

Returns
String
initConstants()method 
override arcane function initConstants(vo:MethodVO):void

Parameters

vo:MethodVO

initVO()method 
override arcane function initVO(vo:MethodVO):void

Parameters

vo:MethodVO

reset()method 
override arcane function reset():void