Packageaway3d.materials.methods
Classpublic class FresnelSpecularMethod
InheritanceFresnelSpecularMethod Inheritance WrapSpecularMethod Inheritance BasicSpecularMethod Inheritance LightingMethodBase Inheritance ShadingMethodBase

FresnelSpecularMethod provides a specular shading method that is stronger on shallow view angles.

Public Properties
 PropertyDefined by
 InheritedbitmapData : BitmapData
The bitmapData that encodes the specular highlight strength per texel in the red channel, and the sharpness in the green channel.
WrapSpecularMethod
 Inheritedgloss : Number
The sharpness of the specular highlight.
BasicSpecularMethod
  normalReflectance : Number
The minimum amount of reflectance, ie the reflectance when the view direction is normal to the surface or light direction.
FresnelSpecularMethod
 Inheritedpasses : Vector
Any passes required that render to a texture used by this method.
WrapSpecularMethod
 InheritedshadowRegister : ShaderRegisterElement
WrapSpecularMethod
 Inheritedspecular : Number
The overall strength of the specular highlights.
BasicSpecularMethod
 InheritedspecularColor : uint
The colour of the specular reflection of the surface.
BasicSpecularMethod
 InheritedviewDirVaryingReg : ShaderRegisterElement
WrapSpecularMethod
Protected Properties
 PropertyDefined by
 Inherited_globalPosVertexReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_mipmap : Boolean = true
ShadingMethodBase
 Inherited_mipmapBitmap : BitmapData
BasicSpecularMethod
 Inherited_needsGlobalPos : Boolean
ShadingMethodBase
 Inherited_needsNormals : Boolean
ShadingMethodBase
 Inherited_needsProjection : Boolean
ShadingMethodBase
 Inherited_needsUV : Boolean
ShadingMethodBase
 Inherited_needsView : Boolean
ShadingMethodBase
 Inherited_normalFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_numLights : int
ShadingMethodBase
 Inherited_passes : Vector
ShadingMethodBase
 Inherited_projectionReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_repeat : Boolean
ShadingMethodBase
 Inherited_smooth : Boolean = true
ShadingMethodBase
 Inherited_specularData : Vector
BasicSpecularMethod
 Inherited_specularDataIndex : uint
BasicSpecularMethod
 Inherited_specularDataRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTexData : ShaderRegisterElement
BasicSpecularMethod
 Inherited_specularTexIndex : uint
BasicSpecularMethod
 Inherited_specularTextureRegister : ShaderRegisterElement
BasicSpecularMethod
 Inherited_totalLightColorReg : ShaderRegisterElement
BasicSpecularMethod
 Inherited_useTexture : Boolean
BasicSpecularMethod
 Inherited_uvFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Public Methods
 MethodDefined by
  
FresnelSpecularMethod
(basedOnSurface:Boolean = true, baseSpecularMethod:BasicSpecularMethod = null)
Creates a new FresnelSpecularMethod object.
FresnelSpecularMethod
 Inherited
Copies the state from a BasicSpecularMethod object into the current object.
BasicSpecularMethod
 Inherited
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
WrapSpecularMethod
 Inherited
Marks the texture for update next on the next render.
WrapSpecularMethod
Protected Methods
 MethodDefined by
 Inherited
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
normalReflectanceproperty
normalReflectance:Number  [read-write]

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)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)
Init Parameters
Method detail
activate()method
arcane override function activate(context:Context3D, contextIndex:uint):void

Sets the render state for this method.

Parameters
context:Context3D — The Context3D currently used for rendering.
 
contextIndex:uint
getFragmentAGALPreLightingCode()method 
arcane override function getFragmentAGALPreLightingCode(regCache:ShaderRegisterCache):String

Get the fragment shader code that will be needed before any per-light code is added.

Parameters
regCache:ShaderRegisterCache — The register cache used during the compilation.

Returns
String
Wiki link
Click to go to the wiki page for 'away3d.materials.methods.FresnelSpecularMethod'

Code examples

Comments