Packageaway3d.materials.methods
Classpublic class ShadingMethodBase
InheritanceShadingMethodBase Inheritance flash.events.EventDispatcher
Subclasses BasicAmbientMethod, BasicNormalMethod, EffectMethodBase, LightingMethodBase, ShadowMapMethodBase

ShadingMethodBase provides an abstract base method for shading methods, used by DefaultScreenPass to compile the final shading program.



Public Properties
 PropertyDefined By
  passes : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
  viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Protected Properties
 PropertyDefined By
  _globalPosReg : ShaderRegisterElement
ShadingMethodBase
  _normalFragmentReg : ShaderRegisterElement
ShadingMethodBase
  _passes : Vector.<MaterialPassBase>
ShadingMethodBase
  _projectionReg : ShaderRegisterElement
ShadingMethodBase
  _secondaryUVFragmentReg : ShaderRegisterElement
ShadingMethodBase
  _tangentVaryingReg : ShaderRegisterElement
ShadingMethodBase
  _uvFragmentReg : ShaderRegisterElement
ShadingMethodBase
  _viewDirFragmentReg : ShaderRegisterElement
ShadingMethodBase
  _viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Public Methods
 MethodDefined By
  
Create a new ShadingMethodBase object.
ShadingMethodBase
  
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
  
dispose():void
Cleans up any resources used by the current object.
ShadingMethodBase
Protected Methods
 MethodDefined By
  
getTexSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, 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
  
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Property Detail
_globalPosRegproperty
protected var _globalPosReg:ShaderRegisterElement

_normalFragmentRegproperty 
protected var _normalFragmentReg:ShaderRegisterElement

_passesproperty 
protected var _passes:Vector.<MaterialPassBase>

_projectionRegproperty 
protected var _projectionReg:ShaderRegisterElement

_secondaryUVFragmentRegproperty 
protected var _secondaryUVFragmentReg:ShaderRegisterElement

_tangentVaryingRegproperty 
protected var _tangentVaryingReg:ShaderRegisterElement

_uvFragmentRegproperty 
protected var _uvFragmentReg:ShaderRegisterElement

_viewDirFragmentRegproperty 
protected var _viewDirFragmentReg:ShaderRegisterElement

_viewDirVaryingRegproperty 
protected var _viewDirVaryingReg:ShaderRegisterElement

globalPosRegproperty 
globalPosReg:ShaderRegisterElement


Implementation
    arcane function get globalPosReg():ShaderRegisterElement
    arcane function set globalPosReg(value:ShaderRegisterElement):void
normalFragmentRegproperty 
normalFragmentReg:ShaderRegisterElement


Implementation
    arcane function get normalFragmentReg():ShaderRegisterElement
    arcane function set normalFragmentReg(value:ShaderRegisterElement):void
passesproperty 
passes:Vector.<MaterialPassBase>  [read-only]

Any passes required that render to a texture used by this method.


Implementation
    public function get passes():Vector.<MaterialPassBase>
projectionRegproperty 
projectionReg:ShaderRegisterElement


Implementation
    arcane function get projectionReg():ShaderRegisterElement
    arcane function set projectionReg(value:ShaderRegisterElement):void
secondaryUVFragmentRegproperty 
secondaryUVFragmentReg:ShaderRegisterElement


Implementation
    arcane function get secondaryUVFragmentReg():ShaderRegisterElement
    arcane function set secondaryUVFragmentReg(value:ShaderRegisterElement):void
tangentVaryingRegproperty 
tangentVaryingReg:ShaderRegisterElement


Implementation
    arcane function get tangentVaryingReg():ShaderRegisterElement
    arcane function set tangentVaryingReg(value:ShaderRegisterElement):void
UVFragmentRegproperty 
UVFragmentReg:ShaderRegisterElement


Implementation
    arcane function get UVFragmentReg():ShaderRegisterElement
    arcane function set UVFragmentReg(value:ShaderRegisterElement):void
viewDirFragmentRegproperty 
viewDirFragmentReg:ShaderRegisterElement


Implementation
    arcane function get viewDirFragmentReg():ShaderRegisterElement
    arcane function set viewDirFragmentReg(value:ShaderRegisterElement):void
viewDirVaryingRegproperty 
viewDirVaryingReg:ShaderRegisterElement


Implementation
    public function get viewDirVaryingReg():ShaderRegisterElement
    public function set viewDirVaryingReg(value:ShaderRegisterElement):void
Constructor Detail
ShadingMethodBase()Constructor
public function ShadingMethodBase()

Create a new ShadingMethodBase object.

Method Detail
copyFrom()method
public function copyFrom(method:ShadingMethodBase):void

Copies the state from a ShadingMethodBase object into the current object.

Parameters

method:ShadingMethodBase

createMethodVO()method 
arcane function createMethodVO():MethodVO

Creates a data container that contains material-dependent data. Provided as a factory method so a custom subtype can be overridden when needed.

Returns
MethodVO
dispose()method 
public function dispose():void

Cleans up any resources used by the current object.

getTexSampleCode()method 
protected function getTexSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, uvReg:ShaderRegisterElement = null, forceWrap:String = null):String

A helper method that generates standard code for sampling from a texture using the normal uv coordinates.

Parameters

vo:MethodVO — The register in which to store the sampled colour.
 
targetReg:ShaderRegisterElement — The texture stream register.
 
inputReg:ShaderRegisterElement
 
uvReg:ShaderRegisterElement (default = null)
 
forceWrap:String (default = null)

Returns
String — The fragment code that performs the sampling.
initConstants()method 
arcane function initConstants(vo:MethodVO):void

Parameters

vo:MethodVO

initVO()method 
arcane function initVO(vo:MethodVO):void

Parameters

vo:MethodVO

invalidateShaderProgram()method 
protected function invalidateShaderProgram():void

Marks the shader program as invalid, so it will be recompiled before the next render.

reset()method 
arcane function reset():void

setRenderState()method 
arcane function setRenderState(vo:MethodVO, renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D):void

Sets the render state for a single renderable.

Parameters

vo:MethodVO
 
renderable:IRenderable
 
stage3DProxy:Stage3DProxy
 
camera:Camera3D