Packageaway3d.materials.passes
Classpublic class SingleObjectDepthPass
InheritanceSingleObjectDepthPass Inheritance MaterialPassBase

The SingleObjectDepthPass provides a material pass that renders a single object to a depth map from the point of view from a light.

Public Properties
 PropertyDefined by
 Inheritedanimation : AnimationBase
The animation used to add vertex code to the shader code.
MaterialPassBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialPassBase
  lights : Vector
[write-only]
SingleObjectDepthPass
 Inheritedmaterial : MaterialBase
The material to which this pass belongs.
MaterialPassBase
 Inheritedmipmap : Boolean
Defines whether any used textures should use mipmapping.
MaterialPassBase
 InheritednumUsedStreams : uint
The amount of used vertex streams in the vertex code.
MaterialPassBase
 InheritednumUsedVertexConstants : uint
The amount of used vertex constants in the vertex code.
MaterialPassBase
 Inheritedrepeat : Boolean
Defines whether textures should be tiled.
MaterialPassBase
 Inheritedsmooth : Boolean
Defines whether smoothing should be applied to any used textures.
MaterialPassBase
Protected Properties
 PropertyDefined by
 Inherited_animatableAttributes : Array
MaterialPassBase
 Inherited_lights : Vector
MaterialPassBase
 Inherited_mipmap : Boolean = false
MaterialPassBase
 Inherited_numLights : uint
MaterialPassBase
 Inherited_numUsedStreams : uint
MaterialPassBase
 Inherited_numUsedVertexConstants : uint
MaterialPassBase
 Inherited_projectedTargetRegister : String
MaterialPassBase
 Inherited_repeat : Boolean = false
MaterialPassBase
 Inherited_smooth : Boolean = true
MaterialPassBase
 Inherited_targetRegisters : Array
MaterialPassBase
Public Methods
 MethodDefined by
  
SingleObjectDepthPass
(textureSize:uint = 512, polyOffset:Number = 15)
Creates a new SingleObjectDepthPass object.
SingleObjectDepthPass
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
SingleObjectDepthPass
Protected Methods
 MethodDefined by
 Inherited
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.
SingleObjectDepthPass
Property detail
lightsproperty
lights:Vector  [write-only]

Implementation
    public function set lights(value:Vector):void
Constructor detail
SingleObjectDepthPass()constructor
public function SingleObjectDepthPass(textureSize:uint = 512, polyOffset:Number = 15)Parameters
textureSize:uint (default = 512) — The size of the depth map texture to render to.
 
polyOffset:Number (default = 15) — The amount by which the rendered object will be inflated, to prevent depth map rounding errors.
Init Parameters
Method detail
activate()method
arcane override function activate(context:Context3D, contextIndex:uint, camera:Camera3D):void

Parameters
context:Context3D
 
contextIndex:uint
 
camera:Camera3D
dispose()method 
public override 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.
getDepthMaps()method 
arcane function getDepthMaps(renderable:IRenderable, contextIndex:int):Vector

Gets the depth maps rendered for this object from all lights.

Parameters
renderable:IRenderable — The renderable for which to retrieve the depth maps
 
contextIndex:int

Returns
Vector — A list of depth map textures for all supported lights.
getFragmentCode()method 
arcane override function getFragmentCode():String

Returns
String
getProjections()method 
arcane function getProjections(renderable:IRenderable):Vector

Retrieves the depth map projection maps for all lights.

Parameters
renderable:IRenderable — The renderable for which to retrieve the projection maps.

Returns
Vector — A list of projection maps for all supported lights.
getVertexCode()method 
arcane override function getVertexCode():String

Returns
String
render()method 
arcane override function render(renderable:IRenderable, context:Context3D, contextIndex:uint, camera:Camera3D):void

Renders an object to the current render target.

Parameters
renderable:IRenderable — The IRenderable object to render.
 
context:Context3D — The context which is performing the rendering.
 
contextIndex:uint — The camera from which the scene is viewed.
 
camera:Camera3D — The lights which influence the rendered scene.
updateProgram()method 
protected override 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.SingleObjectDepthPass'

Code examples

Comments