Packageaway3d.materials.methods
Classpublic class FresnelSpecularMethod
InheritanceFresnelSpecularMethod Inheritance CompositeSpecularMethod Inheritance BasicSpecularMethod Inheritance LightingMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

FresnelSpecularMethod provides a specular shading method that causes stronger highlights on grazing view angles.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
  basedOnSurface : Boolean
Defines whether the fresnel effect should be based on the view angle on the surface (if true), or on the angle between the light and the view.
FresnelSpecularMethod
 InheritedbaseMethod : BasicSpecularMethod
The base specular method on which this method's shading is based.
CompositeSpecularMethod
  fresnelPower : Number
The power used in the Fresnel equation.
FresnelSpecularMethod
 Inheritedgloss : Number
[override] The sharpness of the specular highlight.
CompositeSpecularMethod
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
  normalReflectance : Number
The minimum amount of reflectance, ie the reflectance when the view direction is normal to the surface or light direction.
FresnelSpecularMethod
 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
 Inheritedspecular : Number
[override] The overall strength of the specular highlights.
CompositeSpecularMethod
 InheritedspecularColor : uint
The colour of the specular reflection of the surface.
BasicSpecularMethod
 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
  
FresnelSpecularMethod(basedOnSurface:Boolean = true, baseSpecularMethod:BasicSpecularMethod = null)
Creates a new FresnelSpecularMethod object.
FresnelSpecularMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
[override] Copies the state from a ShadingMethodBase 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
A helper method that generates standard code for sampling from a cube texture.
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
basedOnSurfaceproperty
basedOnSurface:Boolean

Defines whether the fresnel effect should be based on the view angle on the surface (if true), or on the angle between the light and the view.


Implementation
    public function get basedOnSurface():Boolean
    public function set basedOnSurface(value:Boolean):void
fresnelPowerproperty 
fresnelPower:Number

The power used in the Fresnel equation. Higher values make the fresnel effect more pronounced. Defaults to 5.


Implementation
    public function get fresnelPower():Number
    public function set fresnelPower(value:Number):void
normalReflectanceproperty 
normalReflectance:Number

The minimum amount of reflectance, ie the reflectance when the view direction is normal to the surface or light direction.


Implementation
    public function get normalReflectance():Number
    public function set normalReflectance(value:Number):void
Constructor Detail
FresnelSpecularMethod()Constructor
public function FresnelSpecularMethod(basedOnSurface:Boolean = true, baseSpecularMethod:BasicSpecularMethod = null)

Creates a new FresnelSpecularMethod object.

Parameters
basedOnSurface:Boolean (default = true) — Defines whether the fresnel effect should be based on the view angle on the surface (if true), or on the angle between the light and the view.
 
baseSpecularMethod:BasicSpecularMethod (default = null) — The specular method to which the fresnel equation. Defaults to BasicSpecularMethod.
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

Initializes unchanging shader constants using the data from a MethodVO.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.