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

MaterialPassBase provides an abstract base class for material shader passes.



Public Properties
 PropertyDefined By
  alphaPremultiplied : Boolean
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
  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
  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 : Array
MaterialPassBase
  _animationSet : IAnimationSet
MaterialPassBase
  _animationTargetRegisters : Array
MaterialPassBase
  _defaultCulling : String = back
MaterialPassBase
  _depthCompareMode : String = less
MaterialPassBase
  _material : MaterialBase
MaterialPassBase
  _mipmap : Boolean = true
MaterialPassBase
  _numDirectionalLights : uint
MaterialPassBase
  _numLightProbes : uint
MaterialPassBase
  _numPointLights : uint
MaterialPassBase
  _numUsedFragmentConstants : uint
MaterialPassBase
  _numUsedStreams : uint
MaterialPassBase
  _numUsedTextures : uint
MaterialPassBase
  _numUsedVertexConstants : uint
MaterialPassBase
  _repeat : Boolean = false
MaterialPassBase
  _smooth : Boolean = true
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
Property Detail
_alphaPremultipliedproperty
protected var _alphaPremultiplied:Boolean

_animatableAttributesproperty 
protected var _animatableAttributes:Array

_animationSetproperty 
protected var _animationSet:IAnimationSet

_animationTargetRegistersproperty 
protected var _animationTargetRegisters:Array

_defaultCullingproperty 
protected var _defaultCulling:String = back

_depthCompareModeproperty 
protected var _depthCompareMode:String = less

_materialproperty 
protected var _material:MaterialBase

_mipmapproperty 
protected var _mipmap:Boolean = true

_numDirectionalLightsproperty 
protected var _numDirectionalLights:uint

_numLightProbesproperty 
protected var _numLightProbes:uint

_numPointLightsproperty 
protected var _numPointLights:uint

_numUsedFragmentConstantsproperty 
protected var _numUsedFragmentConstants:uint

_numUsedStreamsproperty 
protected var _numUsedStreams:uint

_numUsedTexturesproperty 
protected var _numUsedTextures:uint

_numUsedVertexConstantsproperty 
protected var _numUsedVertexConstants:uint

_program3Didsproperty 
arcane var _program3Dids:Vector.<int>

_program3Dsproperty 
arcane var _program3Ds:Vector.<Program3D>

_repeatproperty 
protected var _repeat:Boolean = false

_smoothproperty 
protected var _smooth:Boolean = true

alphaPremultipliedproperty 
alphaPremultiplied:Boolean


Implementation
    public function get alphaPremultiplied():Boolean
    public function set alphaPremultiplied(value:Boolean):void
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
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
numDirectionalLightsproperty 
numDirectionalLights:uint


Implementation
    arcane function get numDirectionalLights():uint
    arcane function set numDirectionalLights(value:uint):void
numLightProbesproperty 
numLightProbes:uint  [write-only]


Implementation
    arcane function set numLightProbes(value:uint):void
numPointLightsproperty 
numPointLights:uint


Implementation
    arcane function get numPointLights():uint
    arcane function set numPointLights(value:uint):void
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 
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():String

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

Parameters

code: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.

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).