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
Protected Properties
 PropertyDefined By
  _passes : Vector.<MaterialPassBase>
ShadingMethodBase
  _sharedRegisters : ShaderRegisterData
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
  
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
  
ShadingMethodBase
  
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Property Detail
_passesproperty
protected var _passes:Vector.<MaterialPassBase>

_sharedRegistersproperty 
protected var _sharedRegisters:ShaderRegisterData

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>
sharedRegistersproperty 
sharedRegisters:ShaderRegisterData


Implementation
    arcane function get sharedRegisters():ShaderRegisterData
    arcane function set sharedRegisters(value:ShaderRegisterData):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.

getTex2DSampleCode()method 
protected function 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.

Parameters

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

Returns
String — The fragment code that performs the sampling.
getTexCubeSampleCode()method 
protected function getTexCubeSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
targetReg:ShaderRegisterElement
 
inputReg:ShaderRegisterElement
 
texture:TextureProxyBase
 
uvReg:ShaderRegisterElement

Returns
String
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