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

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



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedbaseMethod : BasicSpecularMethod
The base specular method on which this method's shading is based.
CompositeSpecularMethod
 Inheritedgloss : Number
[override] The sharpness of the specular highlight.
CompositeSpecularMethod
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : Vector.<MaterialPassBase>
[override] [read-only] Any passes required that render to a texture used by this method.
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
Protected Properties
 PropertyDefined By
 Inherited_isFirstLight : Boolean
BasicSpecularMethod
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
 Inherited_specularDataRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTexData : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTextureRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_totalLightColorReg : ShaderRegisterElement
BasicSpecularMethod
 Inherited_useTexture : Boolean
BasicSpecularMethod
Public Methods
 MethodDefined By
  
CelSpecularMethod(specularCutOff:Number = .5, baseSpecularMethod:BasicSpecularMethod = null)
Creates a new CelSpecularMethod object.
CelSpecularMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 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
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 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
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