Packageaway3d.materials.methods
Classpublic class CelSpecularMethod
InheritanceCelSpecularMethod Inheritance CompositeSpecularMethod Inheritance BasicSpecularMethod Inheritance LightingMethodBase Inheritance ShadingMethodBase Inheritance flash.events.EventDispatcher

CelSpecularMethod provides a shading method to add diffuse cel (cartoon) shading.



Public Properties
 PropertyDefined By
 Inheritedgloss : Number
[override] The sharpness of the specular highlight.
CompositeSpecularMethod
 Inheritedpasses : Vector.<MaterialPassBase>
[override] [read-only] Any passes required that render to a texture used by this method.
CompositeSpecularMethod
 InheritedshadingModel : String
[override] The model used by the specular shader
CompositeSpecularMethod
  smoothness : Number
The smoothness of the highlight edge.
CelSpecularMethod
 Inheritedspecular : Number
[override] The overall strength of the specular highlights.
CompositeSpecularMethod
 InheritedspecularColor : uint
The colour of the specular reflection of the surface.
BasicSpecularMethod
  specularCutOff : Number
The threshold at which the specular highlight should be shown.
CelSpecularMethod
 Inheritedtexture : Texture2DBase
[override] The bitmapData that encodes the specular highlight strength per texel in the red channel, and the sharpness in the green channel.
CompositeSpecularMethod
 InheritedviewDirVaryingReg : ShaderRegisterElement
[override]
CompositeSpecularMethod
Protected Properties
 PropertyDefined By
 Inherited_globalPosReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_normalFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_projectionReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_secondaryUVFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_specularDataRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTexData : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTextureRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_tangentVaryingReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_totalLightColorReg : ShaderRegisterElement
BasicSpecularMethod
 Inherited_useTexture : Boolean
BasicSpecularMethod
 Inherited_uvFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Public Methods
 MethodDefined By
  
CelSpecularMethod(specularCutOff:Number = .5, baseSpecularMethod:BasicSpecularMethod = null)
Creates a new CelSpecularMethod object.
CelSpecularMethod
 Inherited
[override] Copies the state from a BasicSpecularMethod object into the current object.
BasicSpecularMethod
 Inherited
dispose():void
[override] Cleans up any resources used by the current object.
CompositeSpecularMethod
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
smoothnessproperty
smoothness:Number

The smoothness of the highlight edge.


Implementation
    public function get smoothness():Number
    public function set smoothness(value:Number):void
specularCutOffproperty 
specularCutOff:Number

The threshold at which the specular highlight should be shown.


Implementation
    public function get specularCutOff():Number
    public function set specularCutOff(value:Number):void
Constructor Detail
CelSpecularMethod()Constructor
public function CelSpecularMethod(specularCutOff:Number = .5, baseSpecularMethod:BasicSpecularMethod = null)

Creates a new CelSpecularMethod object.

Parameters
specularCutOff:Number (default = .5) — The threshold at which the specular highlight should be shown.
 
baseSpecularMethod:BasicSpecularMethod (default = null) — An optional specular method on which the cartoon shading is based. If ommitted, BasicSpecularMethod 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