Packageaway3d.materials.passes
Classpublic class MaterialPassBase
InheritanceMaterialPassBase Inheritance flash.events.EventDispatcher
Subclasses CompiledPass, DepthMapPass, DistanceMapPass, OutlinePass, SegmentPass, SingleObjectDepthPass, SkyBoxPass

MaterialPassBase provides an abstract base class for material shader passes. Vertex stream index 0 is reserved for vertex positions. Vertex shader constants index 0-3 are reserved for projections, constant 4 for viewport positioning Vertex shader constant index 4 is reserved for render-to-texture scaling



Public Properties
 PropertyDefined By
  alphaPremultiplied : Boolean
MaterialPassBase
  animationRegisterCache : AnimationRegisterCache
MaterialPassBase
  animationSet : IAnimationSet
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
  depthCompareMode : String
MaterialPassBase
  material : MaterialBase
The material to which this pass belongs.
MaterialPassBase
  mipmap : Boolean
Defines whether any used textures should use mipmapping.
MaterialPassBase
  needFragmentAnimation : Boolean
[read-only]
MaterialPassBase
  needUVAnimation : Boolean
[read-only]
MaterialPassBase
  numUsedFragmentConstants : uint
[read-only]
MaterialPassBase
  numUsedStreams : uint
[read-only] The amount of used vertex streams in the vertex code.
MaterialPassBase
  numUsedVaryings : uint
[read-only]
MaterialPassBase
  numUsedVertexConstants : uint
[read-only] The amount of used vertex constants in the vertex code.
MaterialPassBase
  renderToTexture : Boolean
[read-only] Specifies whether this pass renders to texture
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
  _alphaPremultiplied : Boolean
MaterialPassBase
  _animatableAttributes : Vector.<String>
MaterialPassBase
  _animationSet : IAnimationSet
MaterialPassBase
  _animationTargetRegisters : Vector.<String>
MaterialPassBase
  _defaultCulling : String = back
MaterialPassBase
  _depthCompareMode : String = lessEqual
MaterialPassBase
  _lightPicker : LightPickerBase
MaterialPassBase
  _material : MaterialBase
MaterialPassBase
  _mipmap : Boolean = true
MaterialPassBase
  _needFragmentAnimation : Boolean
MaterialPassBase
  _needUVAnimation : Boolean
MaterialPassBase
  _numUsedFragmentConstants : uint
MaterialPassBase
  _numUsedStreams : uint
MaterialPassBase
  _numUsedTextures : uint
MaterialPassBase
  _numUsedVaryings : uint
MaterialPassBase
  _numUsedVertexConstants : uint
MaterialPassBase
  _repeat : Boolean = false
MaterialPassBase
  _shadedTarget : String = ft0
MaterialPassBase
  _smooth : Boolean = true
MaterialPassBase
  _UVSource : String
MaterialPassBase
  _UVTarget : String
MaterialPassBase
Public Methods
 MethodDefined By
  
MaterialPassBase(renderToTexture:Boolean = false)
Creates a new MaterialPassBase object.
MaterialPassBase
  
dispose():void
Cleans up any resources used by the current object.
MaterialPassBase
  
setBlendMode(value:String, force:Boolean = false):void
MaterialPassBase
Protected Methods
 MethodDefined By
  
MaterialPassBase
Property Detail
_alphaPremultipliedproperty
protected var _alphaPremultiplied:Boolean

_animatableAttributesproperty 
protected var _animatableAttributes:Vector.<String>

_animationSetproperty 
protected var _animationSet:IAnimationSet

_animationTargetRegistersproperty 
protected var _animationTargetRegisters:Vector.<String>

_defaultCullingproperty 
protected var _defaultCulling:String = back

_depthCompareModeproperty 
protected var _depthCompareMode:String = lessEqual

_lightPickerproperty 
protected var _lightPicker:LightPickerBase

_materialproperty 
protected var _material:MaterialBase

_mipmapproperty 
protected var _mipmap:Boolean = true

_needFragmentAnimationproperty 
protected var _needFragmentAnimation:Boolean

_needUVAnimationproperty 
protected var _needUVAnimation:Boolean

_numUsedFragmentConstantsproperty 
protected var _numUsedFragmentConstants:uint

_numUsedStreamsproperty 
protected var _numUsedStreams:uint

_numUsedTexturesproperty 
protected var _numUsedTextures:uint

_numUsedVaryingsproperty 
protected var _numUsedVaryings:uint

_numUsedVertexConstantsproperty 
protected var _numUsedVertexConstants:uint

_program3Didsproperty 
arcane var _program3Dids:Vector.<int>

_program3Dsproperty 
arcane var _program3Ds:Vector.<Program3D>

_repeatproperty 
protected var _repeat:Boolean = false

_shadedTargetproperty 
protected var _shadedTarget:String = ft0

_smoothproperty 
protected var _smooth:Boolean = true

_UVSourceproperty 
protected var _UVSource:String

_UVTargetproperty 
protected var _UVTarget:String

alphaPremultipliedproperty 
alphaPremultiplied:Boolean


Implementation
    public function get alphaPremultiplied():Boolean
    public function set alphaPremultiplied(value:Boolean):void
animationRegisterCacheproperty 
public var animationRegisterCache:AnimationRegisterCache

animationSetproperty 
animationSet:IAnimationSet

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


Implementation
    public function get animationSet():IAnimationSet
    public function set animationSet(value:IAnimationSet):void
bothSidesproperty 
bothSides:Boolean

Defines whether or not the material should perform backface culling.


Implementation
    public function get bothSides():Boolean
    public function set bothSides(value:Boolean):void
depthCompareModeproperty 
depthCompareMode:String


Implementation
    public function get depthCompareMode():String
    public function set depthCompareMode(value:String):void
lightPickerproperty 
lightPicker:LightPickerBase


Implementation
    arcane function get lightPicker():LightPickerBase
    arcane function set lightPicker(value:LightPickerBase):void
materialproperty 
material:MaterialBase

The material to which this pass belongs.


Implementation
    public function get material():MaterialBase
    public function set material(value:MaterialBase):void
mipmapproperty 
mipmap:Boolean

Defines whether any used textures should use mipmapping.


Implementation
    public function get mipmap():Boolean
    public function set mipmap(value:Boolean):void
needFragmentAnimationproperty 
needFragmentAnimation:Boolean  [read-only]


Implementation
    public function get needFragmentAnimation():Boolean
needUVAnimationproperty 
needUVAnimation:Boolean  [read-only]


Implementation
    public function get needUVAnimation():Boolean
numUsedFragmentConstantsproperty 
numUsedFragmentConstants:uint  [read-only]


Implementation
    public function get numUsedFragmentConstants():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
numUsedVaryingsproperty 
numUsedVaryings:uint  [read-only]


Implementation
    public function get numUsedVaryings():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
renderToTextureproperty 
renderToTexture:Boolean  [read-only]

Specifies whether this pass renders to texture


Implementation
    public function get renderToTexture():Boolean
repeatproperty 
repeat:Boolean

Defines whether textures should be tiled.


Implementation
    public function get repeat():Boolean
    public function set repeat(value:Boolean):void
smoothproperty 
smooth:Boolean

Defines whether smoothing should be applied to any used textures.


Implementation
    public function get smooth():Boolean
    public function set smooth(value:Boolean):void
Constructor Detail
MaterialPassBase()Constructor
public function MaterialPassBase(renderToTexture:Boolean = false)

Creates a new MaterialPassBase object.

Parameters
renderToTexture:Boolean (default = false)
Method Detail
activate()method
arcane function activate(stage3DProxy:Stage3DProxy, camera:Camera3D, textureRatioX:Number, textureRatioY:Number):void

Parameters

stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
textureRatioX:Number
 
textureRatioY:Number

dispose()method 
public function dispose():void

Cleans up any resources used by the current object.

getFragmentCode()method 
arcane function getFragmentCode(code:String):String

Parameters

code:String

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

Returns
String
invalidateShaderProgram()method 
arcane function invalidateShaderProgram(updateMaterial:Boolean = true):void

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

Parameters

updateMaterial:Boolean (default = true) — Indicates whether the invalidation should be performed on the entire material. Should always pass "true" unless it's called from the material itself.

setBlendMode()method 
public function setBlendMode(value:String, force:Boolean = false):void

Parameters

value:String
 
force:Boolean (default = false)

updateLights()method 
protected function updateLights():void

updateProgram()method 
arcane function updateProgram(stage3DProxy:Stage3DProxy):void

Compiles the shader program.

Parameters

stage3DProxy:Stage3DProxy — An optional register that contains an amount by which to inflate the model (used in single object depth map rendering).