Package | away3d.materials.methods |
Class | public class BasicSpecularMethod |
Inheritance | BasicSpecularMethod LightingMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | AnisotropicSpecularMethod, CompositeSpecularMethod, PhongSpecularMethod |
Property | Defined By | ||
---|---|---|---|
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
gloss : Number
The sharpness of the specular highlight. | BasicSpecularMethod | ||
id : String | NamedAssetBase | ||
name : String | NamedAssetBase | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
passes : Vector.<MaterialPassBase> [read-only]
Any passes required that render to a texture used by this method. | ShadingMethodBase | ||
specular : Number
The overall strength of the specular highlights. | BasicSpecularMethod | ||
specularColor : uint
The colour of the specular reflection of the surface. | BasicSpecularMethod | ||
texture : Texture2DBase
The bitmapData that encodes the specular highlight strength per texel in the red channel, and the sharpness
in the green channel. | BasicSpecularMethod |
Property | Defined By | ||
---|---|---|---|
_isFirstLight : Boolean | BasicSpecularMethod | ||
_passes : Vector.<MaterialPassBase> | ShadingMethodBase | ||
_sharedRegisters : ShaderRegisterData | ShadingMethodBase | ||
_specularDataRegister : ShaderRegisterElement | BasicSpecularMethod | ||
_specularTexData : ShaderRegisterElement | BasicSpecularMethod | ||
_specularTextureRegister : ShaderRegisterElement | BasicSpecularMethod | ||
_totalLightColorReg : ShaderRegisterElement | BasicSpecularMethod | ||
_useTexture : Boolean | BasicSpecularMethod |
Method | Defined By | ||
---|---|---|---|
Creates a new BasicSpecularMethod object. | BasicSpecularMethod | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
copyFrom(method:ShadingMethodBase):void [override]
Copies the state from a ShadingMethodBase object into the current object. | BasicSpecularMethod | ||
dispose():void
Cleans up any resources used by the current object. | ShadingMethodBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
_isFirstLight | property |
protected var _isFirstLight:Boolean
_specularDataRegister | property |
protected var _specularDataRegister:ShaderRegisterElement
_specularR | property |
arcane var _specularR:Number = 1
_specularTexData | property |
protected var _specularTexData:ShaderRegisterElement
_specularTextureRegister | property |
protected var _specularTextureRegister:ShaderRegisterElement
_totalLightColorReg | property |
protected var _totalLightColorReg:ShaderRegisterElement
_useTexture | property |
protected var _useTexture:Boolean
gloss | property |
gloss:Number
The sharpness of the specular highlight.
public function get gloss():Number
public function set gloss(value:Number):void
shadowRegister | property |
shadowRegister:ShaderRegisterElement
[write-only] Set internally by the compiler, so the method knows the register containing the shadow calculation.
arcane function set shadowRegister(value:ShaderRegisterElement):void
specular | property |
specular:Number
The overall strength of the specular highlights.
public function get specular():Number
public function set specular(value:Number):void
specularColor | property |
specularColor:uint
The colour of the specular reflection of the surface.
public function get specularColor():uint
public function set specularColor(value:uint):void
texture | property |
texture: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 grayscale images, but prepared images are preferred.
public function get texture():Texture2DBase
public function set texture(value:Texture2DBase):void
BasicSpecularMethod | () | Constructor |
public function BasicSpecularMethod()
Creates a new BasicSpecularMethod object.
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
cleanCompilationData | () | method |
override arcane function cleanCompilationData():void
copyFrom | () | method |
override public function copyFrom(method:ShadingMethodBase):void
Copies the state from a ShadingMethodBase object into the current object.
Parameters
method:ShadingMethodBase |
getFragmentCodePerLight | () | method |
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
vo:MethodVO — The MethodVO object containing the method data for the currently compiled material pass.
| |
lightDirReg:ShaderRegisterElement — The register containing the light direction vector.
| |
lightColReg:ShaderRegisterElement — The register containing the light colour.
| |
regCache:ShaderRegisterCache — The register cache used during the compilation.
|
String |
getFragmentCodePerProbe | () | method |
override 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 MethodVO object containing the method data for the currently compiled material pass.
| |
cubeMapReg:ShaderRegisterElement — The register containing the cube map for the current probe
| |
weightRegister:String — A string representation of the register + component containing the current weight
| |
regCache:ShaderRegisterCache — The register cache providing any necessary registers to the shader
|
String |
getFragmentPostLightingCode | () | method |
override arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache | |
targetReg:ShaderRegisterElement |
String |
getFragmentPreLightingCode | () | method |
override arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache |
String |
initVO | () | method |
override arcane function initVO(vo:MethodVO):void
Initializes the properties for a MethodVO, including register and texture indices.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
|