Packageaway3d.materials.passes
Classpublic class MaterialPassBase
SubclassesDefaultScreenPass, SingleObjectDepthPass, SkyBoxPass, WireFramePass

MaterialPassBase provides an abstract base class for material shader passes.

Public Properties
 PropertyDefined by
  animation : AnimationBase
The animation used to add vertex code to the shader code.
MaterialPassBase
  bothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialPassBase
  lights : Vector
MaterialPassBase
  material : MaterialBase
The material to which this pass belongs.
MaterialPassBase
  mipmap : Boolean
Defines whether any used textures should use mipmapping.
MaterialPassBase
  numUsedStreams : uint
[read-only] The amount of used vertex streams in the vertex code.
MaterialPassBase
  numUsedVertexConstants : uint
[read-only] The amount of used vertex constants in the vertex code.
MaterialPassBase
  repeat : Boolean
Defines whether textures should be tiled.
MaterialPassBase
  smooth : Boolean
Defines whether smoothing should be applied to any used textures.
MaterialPassBase
Protected Properties
 PropertyDefined by
  _animatableAttributes : Array
MaterialPassBase
  _lights : Vector
MaterialPassBase
  _mipmap : Boolean = false
MaterialPassBase
  _numLights : uint
MaterialPassBase
  _numUsedStreams : uint
MaterialPassBase
  _numUsedVertexConstants : uint
MaterialPassBase
  _projectedTargetRegister : String
MaterialPassBase
  _repeat : Boolean = false
MaterialPassBase
  _smooth : Boolean = true
MaterialPassBase
  _targetRegisters : Array
MaterialPassBase
Public Methods
 MethodDefined by
  
Creates a new MaterialPassBase object.
MaterialPassBase
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
MaterialPassBase
Protected Methods
 MethodDefined by
  
initPass(context:Context3D, contextIndex:uint):void
Initializes the shader program object.
MaterialPassBase
  
updateProgram(context:Context3D, contextIndex:uint, polyOffsetReg:String = null):void
Compiles the shader program.
MaterialPassBase
Property detail
_animatableAttributesproperty
protected var _animatableAttributes:Array
animationproperty 
animation:AnimationBase  [read-write]

The animation used to add vertex code to the shader code.

Implementation
    public function get animation():AnimationBase
    public function set animation(value:AnimationBase):void
bothSidesproperty 
bothSides:Boolean  [read-write]

Defines whether or not the material should perform backface culling.

Implementation
    public function get bothSides():Boolean
    public function set bothSides(value:Boolean):void
_lightsproperty 
protected var _lights:Vector
lightsproperty 
lights:Vector  [read-write]Implementation
    public function get lights():Vector
    public function set lights(value:Vector):void
materialproperty 
material:MaterialBase  [read-write]

The material to which this pass belongs.

Implementation
    public function get material():MaterialBase
    public function set material(value:MaterialBase):void
_mipmapproperty 
protected var _mipmap:Boolean = false
mipmapproperty 
mipmap:Boolean  [read-write]

Defines whether any used textures should use mipmapping.

Implementation
    public function get mipmap():Boolean
    public function set mipmap(value:Boolean):void
_numLightsproperty 
protected var _numLights:uint
_numUsedStreamsproperty 
protected var _numUsedStreams:uint
numUsedStreamsproperty 
numUsedStreams:uint  [read-only]

The amount of used vertex streams in the vertex code. Used by the animation code generation to know from which index on streams are available.

Implementation
    public function get numUsedStreams():uint
_numUsedVertexConstantsproperty 
protected var _numUsedVertexConstants:uint
numUsedVertexConstantsproperty 
numUsedVertexConstants:uint  [read-only]

The amount of used vertex constants in the vertex code. Used by the animation code generation to know from which index on registers are available.

Implementation
    public function get numUsedVertexConstants():uint
_projectedTargetRegisterproperty 
protected var _projectedTargetRegister:String
_repeatproperty 
protected var _repeat:Boolean = false
repeatproperty 
repeat:Boolean  [read-write]

Defines whether textures should be tiled.

Implementation
    public function get repeat():Boolean
    public function set repeat(value:Boolean):void
_smoothproperty 
protected var _smooth:Boolean = true
smoothproperty 
smooth:Boolean  [read-write]

Defines whether smoothing should be applied to any used textures.

Implementation
    public function get smooth():Boolean
    public function set smooth(value:Boolean):void
_targetRegistersproperty 
protected var _targetRegisters:Array
Constructor detail
MaterialPassBase()constructor
public function MaterialPassBase() Init Parameters
Method detail
activate()method
arcane function activate(context:Context3D, contextIndex:uint, camera:Camera3D):void Parameters
context:Context3D
 
contextIndex:uint
 
camera:Camera3D
dispose()method 
public function dispose(deep:Boolean):void

Cleans up any resources used by the current object.

Parameters
deep:Boolean — Indicates whether other resources should be cleaned up, that could potentially be shared across different instances.
getFragmentCode()method 
arcane function getFragmentCode():String

Returns
String
getVertexCode()method 
arcane function getVertexCode():String

Returns
String
initPass()method 
protected function initPass(context:Context3D, contextIndex:uint):void

Initializes the shader program object.

Parameters
context:Context3D
 
contextIndex:uint
invalidateShaderProgram()method 
arcane function invalidateShaderProgram():void

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

updateProgram()method 
protected function updateProgram(context:Context3D, contextIndex:uint, polyOffsetReg:String = null):void

Compiles the shader program.

Parameters
context:Context3D — The context for which to compile the shader program.
 
contextIndex:uint — An optional register that contains an amount by which to inflate the model (used in single object depth map rendering).
 
polyOffsetReg:String (default = null)
Wiki link
Click to go to the wiki page for 'away3d.materials.passes.MaterialPassBase'

Code examples

Comments