Packageaway3d.materials.passes
Classpublic class DefaultScreenPass
InheritanceDefaultScreenPass Inheritance MaterialPassBase

DefaultScreenPass is a shader pass that uses shader methods to compile a complete program.

See also

away3d.materials.methods.ShadingMethodBase
Public Properties
 PropertyDefined by
  ambientMethod : BasicAmbientMethod
DefaultScreenPass
 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
  colorTransform : ColorTransform
The ColorTransform object to transform the colour of the material with.
DefaultScreenPass
  diffuseMethod : BasicDiffuseMethod
The method to perform diffuse shading.
DefaultScreenPass
  lights : Vector
[write-only]
DefaultScreenPass
 Inheritedmaterial : MaterialBase
The material to which this pass belongs.
MaterialPassBase
  mipmap : Boolean
[write-only]
DefaultScreenPass
  normalMap : Texture3DProxy
The tangent space normal map to influence the direction of the surface for each texel.
DefaultScreenPass
 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
  shadowMethod : ShadingMethodBase
DefaultScreenPass
 Inheritedsmooth : Boolean
Defines whether smoothing should be applied to any used textures.
MaterialPassBase
  specularMethod : BasicSpecularMethod
The method to perform specular shading.
DefaultScreenPass
Protected Properties
 PropertyDefined by
 Inherited_animatableAttributes : Array
MaterialPassBase
  _cameraPositionIndex : int
DefaultScreenPass
 Inherited_lights : Vector
MaterialPassBase
  _lightsColorIndex : int
DefaultScreenPass
 Inherited_mipmap : Boolean = false
MaterialPassBase
  _normalBufferIndex : int
DefaultScreenPass
  _normalMapIndex : int
DefaultScreenPass
 Inherited_numLights : uint
MaterialPassBase
 Inherited_numUsedStreams : uint
MaterialPassBase
 Inherited_numUsedVertexConstants : uint
MaterialPassBase
 Inherited_projectedTargetRegister : String
MaterialPassBase
 Inherited_repeat : Boolean = false
MaterialPassBase
  _sceneMatrixIndex : int
DefaultScreenPass
  _sceneNormalMatrixIndex : int
DefaultScreenPass
 Inherited_smooth : Boolean = true
MaterialPassBase
  _tangentBufferIndex : int
DefaultScreenPass
 Inherited_targetRegisters : Array
MaterialPassBase
  _uvBufferIndex : int
DefaultScreenPass
Public Methods
 MethodDefined by
  
Creates a new DefaultScreenPass objects.
DefaultScreenPass
  
Adds a method to change the material after all lighting is performed.
DefaultScreenPass
  
addMethodAt(method:ShadingMethodBase, index:int):void
Inserts a method to change the material after all lighting is performed at the given index.
DefaultScreenPass
  
dispose(deep:Boolean):void
Cleans up any resources used by the current object.
DefaultScreenPass
  
Removes a method from the pass.
DefaultScreenPass
Protected Methods
 MethodDefined by
  
A helper method that generates standard code for sampling from a texture using the normal uv coordinates.
DefaultScreenPass
 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.
DefaultScreenPass
Property detail
ambientMethodproperty
ambientMethod:BasicAmbientMethod  [read-write]Implementation
    public function get ambientMethod():BasicAmbientMethod
    public function set ambientMethod(value:BasicAmbientMethod):void
_cameraPositionIndexproperty 
protected var _cameraPositionIndex:int
colorTransformproperty 
colorTransform:ColorTransform  [read-write]

The ColorTransform object to transform the colour of the material with.

Implementation
    public function get colorTransform():ColorTransform
    public function set colorTransform(value:ColorTransform):void
colorTransformMethodproperty 
colorTransformMethod:ColorTransformMethod  [read-write]Implementation
    arcane function get colorTransformMethod():ColorTransformMethod
    arcane function set colorTransformMethod(value:ColorTransformMethod):void
diffuseMethodproperty 
diffuseMethod:BasicDiffuseMethod  [read-write]

The method to perform diffuse shading.

Implementation
    public function get diffuseMethod():BasicDiffuseMethod
    public function set diffuseMethod(value:BasicDiffuseMethod):void
generateTangentsproperty 
generateTangents:Boolean  [read-write]Implementation
    arcane function get generateTangents():Boolean
    arcane function set generateTangents(value:Boolean):void
lightsproperty 
lights:Vector  [write-only]

Implementation
    public function set lights(value:Vector):void
_lightsColorIndexproperty 
protected var _lightsColorIndex:int
mipmapproperty 
mipmap:Boolean  [write-only]

Implementation
    public function set mipmap(value:Boolean):void
_normalBufferIndexproperty 
protected var _normalBufferIndex:int
normalMapproperty 
normalMap:Texture3DProxy  [read-write]

The tangent space normal map to influence the direction of the surface for each texel.

Implementation
    public function get normalMap():Texture3DProxy
    public function set normalMap(value:Texture3DProxy):void
_normalMapIndexproperty 
protected var _normalMapIndex:int
_passesproperty 
arcane var _passes:Vector
_passesDirtyproperty 
arcane var _passesDirty:Boolean
_sceneMatrixIndexproperty 
protected var _sceneMatrixIndex:int
_sceneNormalMatrixIndexproperty 
protected var _sceneNormalMatrixIndex:int
shadowMethodproperty 
shadowMethod:ShadingMethodBase  [read-write]Implementation
    public function get shadowMethod():ShadingMethodBase
    public function set shadowMethod(value:ShadingMethodBase):void
specularMethodproperty 
specularMethod:BasicSpecularMethod  [read-write]

The method to perform specular shading.

Implementation
    public function get specularMethod():BasicSpecularMethod
    public function set specularMethod(value:BasicSpecularMethod):void
_tangentBufferIndexproperty 
protected var _tangentBufferIndex:int
_uvBufferIndexproperty 
protected var _uvBufferIndex:int
Constructor detail
DefaultScreenPass()constructor
public function DefaultScreenPass() Init Parameters
Method detail
activate()method
arcane override function activate(context:Context3D, contextIndex:uint, camera:Camera3D):void

Parameters
context:Context3D
 
contextIndex:uint
 
camera:Camera3D
addMethod()method 
public function addMethod(method:ShadingMethodBase):void

Adds a method to change the material after all lighting is performed.

Parameters
method:ShadingMethodBase — The method to be added.
addMethodAt()method 
public function addMethodAt(method:ShadingMethodBase, index:int):void

Inserts a method to change the material after all lighting is performed at the given index.

Parameters
method:ShadingMethodBase — The method to be added.
 
index:int — The index of the method's occurrence
deactivate()method 
arcane override function deactivate(context:Context3D):void

Turns off streams starting from a certain offset

Parameters
context:Context3D
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.
getFragmentCode()method 
arcane override function getFragmentCode():String

Returns
String
getTexSampleCode()method 
protected function getTexSampleCode(targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement):String

A helper method that generates standard code for sampling from a texture using the normal uv coordinates.

Parameters
targetReg:ShaderRegisterElement — The register in which to store the sampled colour.
 
inputReg:ShaderRegisterElement — The texture stream register.

Returns
String — The fragment code that performs the sampling.
getVertexCode()method 
arcane override function getVertexCode():String

Returns
String
invalidateShaderProgram()method 
arcane override function invalidateShaderProgram():void

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

removeMethod()method 
public function removeMethod(method:ShadingMethodBase):void

Removes a method from the pass.

Parameters
method:ShadingMethodBase — The method to be removed.
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.DefaultScreenPass'

Code examples

Comments