BasicSpecularMethod provides the default shading method for Blinn-Phong specular highlights.
protected var _isFirstLight:Booleanprotected var _specularDataRegister:ShaderRegisterElementarcane var _specularR:Number = 1protected var _specularTexData:ShaderRegisterElementprotected var _specularTextureRegister:ShaderRegisterElementprotected var _totalLightColorReg:ShaderRegisterElementprotected var _useTexture:Booleangloss:Number
The sharpness of the specular highlight.
Implementation public function get gloss():Number public function set gloss(value:Number):voidshadowRegister:ShaderRegisterElement [write-only]
Implementation arcane function set shadowRegister(value:ShaderRegisterElement):voidspecular:Number
The overall strength of the specular highlights.
Implementation public function get specular():Number public function set specular(value:Number):voidspecularColor:uint
The colour of the specular reflection of the surface.
Implementation public function get specularColor():uint public function set specularColor(value:uint):voidtexture:Texture2DBase
The bitmapData that encodes the specular highlight strength per texel in the red channel, and the sharpness
in the green channel. You can use SpecularBitmapTexture if you want to easily set specular and gloss maps
from greyscale images, but prepared images are preffered.
Implementation public function get texture():Texture2DBase public function set texture(value:Texture2DBase):voidpublic function BasicSpecularMethod()
Creates a new BasicSpecularMethod object.
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
override arcane function cleanCompilationData():void
override public function copyFrom(method:ShadingMethodBase):void
Copies the state from a BasicSpecularMethod object into the current object.
Parameters
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
Returnsoverride 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 |
Returnsoverride arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Parameters
Returnsoverride arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
Returnsoverride arcane function initVO(vo:MethodVO):void Parameters
Tue May 7 2013, 10:42 PM +01:00