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

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



Public Properties
 PropertyDefined By
 InheritedalphaThreshold : Number
[override]
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
 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
 InheritedviewDirVaryingReg : ShaderRegisterElement
[override]
CompositeDiffuseMethod
Protected Properties
 PropertyDefined By
 Inherited_alphaThreshold : Number = 0
BasicDiffuseMethod
 Inherited_diffuseInputRegister : ShaderRegisterElement
BasicDiffuseMethod
 Inherited_globalPosReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_normalFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_projectionReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_secondaryUVFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_shadowRegister : ShaderRegisterElement
BasicDiffuseMethod
 Inherited_tangentVaryingReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_useTexture : Boolean
BasicDiffuseMethod
 Inherited_uvFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Public Methods
 MethodDefined By
  
CelDiffuseMethod(levels:uint = 3, baseDiffuseMethod:BasicDiffuseMethod = null)
Creates a new CelDiffuseMethod object.
CelDiffuseMethod
 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
Protected Methods
 MethodDefined By
 Inherited
getTexSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, 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
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
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