Packageaway3d.materials.methods
Classpublic class CelDiffuseMethod
InheritanceCelDiffuseMethod Inheritance CompositeDiffuseMethod Inheritance BasicDiffuseMethod Inheritance LightingMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

CelDiffuseMethod provides a shading method to add specular cel (cartoon) shading.



Public Properties
 PropertyDefined By
 InheritedalphaThreshold : Number
[override]
CompositeDiffuseMethod
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedbaseMethod : BasicDiffuseMethod
The base diffuse method on which this method's shading is based.
CompositeDiffuseMethod
 InheriteddiffuseAlpha : Number
[override] The alpha component of the diffuse reflection.
CompositeDiffuseMethod
 InheriteddiffuseColor : uint
[override] The color of the diffuse reflection when not using a texture.
CompositeDiffuseMethod
  levels : uint
CelDiffuseMethod
 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
  smoothness : Number
The smoothness of the edge between 2 shading levels.
CelDiffuseMethod
 Inheritedtexture : 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
 Inherited_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
  
CelDiffuseMethod(levels:uint = 3, baseDiffuseMethod:BasicDiffuseMethod = null)
Creates a new CelDiffuseMethod object.
CelDiffuseMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Copies the state from a BasicDiffuseMethod object into the current object.
BasicDiffuseMethod
 Inherited
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
levelsproperty
levels:uint


Implementation
    public function get levels():uint
    public function set levels(value:uint):void
smoothnessproperty 
smoothness:Number

The smoothness of the edge between 2 shading levels.


Implementation
    public function get smoothness():Number
    public function set smoothness(value:Number):void
Constructor Detail
CelDiffuseMethod()Constructor
public function CelDiffuseMethod(levels:uint = 3, baseDiffuseMethod:BasicDiffuseMethod = null)

Creates a new CelDiffuseMethod object.

Parameters
levels:uint (default = 3) — The amount of shadow gradations.
 
baseDiffuseMethod:BasicDiffuseMethod (default = null) — An optional diffuse method on which the cartoon shading is based. If ommitted, BasicDiffuseMethod is used.
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

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

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache

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

Parameters

vo:MethodVO