Packageaway3d.materials.passes
Classpublic class LightingPass
InheritanceLightingPass Inheritance CompiledPass Inheritance MaterialPassBase Inheritance flash.events.EventDispatcher

LightingPass is a shader pass that uses shader methods to compile a complete program. It only includes the lighting methods. It's used by multipass materials to accumulate lighting passes.

See also

away3d.materials.MultiPassMaterialBase


Public Properties
 PropertyDefined By
 InheritedalphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have already been premultiplied.
MaterialPassBase
 InheritedambientMethod : BasicAmbientMethod
The method that provides the ambient lighting contribution.
CompiledPass
 InheritedanimateUVs : Boolean
Indicate whether UV coordinates need to be animated using the renderable's transformUV matrix.
CompiledPass
 InheritedanimationRegisterCache : AnimationRegisterCache
MaterialPassBase
 InheritedanimationSet : IAnimationSet
Returns the animation data set adding animations to the material.
MaterialPassBase
 InheritedbothSides : Boolean
Defines whether or not the material should perform backface culling.
MaterialPassBase
 InheriteddepthCompareMode : String
The depth compare mode used to render the renderables using this material.
MaterialPassBase
 InheriteddiffuseLightSources : uint
Define which light source types to use for diffuse reflections.
CompiledPass
 InheriteddiffuseMethod : BasicDiffuseMethod
The method that provides the diffuse lighting contribution.
CompiledPass
  directionalLightsOffset : uint
Indicates the offset in the light picker's directional light vector for which to start including lights.
LightingPass
 InheritedenableLightFallOff : Boolean
Whether or not to use fallOff and radius properties for lights.
CompiledPass
 InheritedforceSeparateMVP : Boolean
Indicates whether the screen projection should be calculated by forcing a separate scene matrix and view-projection matrix.
CompiledPass
  includeCasters : Boolean
Indicates whether or not shadow casting lights need to be included.
LightingPass
  lightProbesOffset : uint
Indicates the offset in the light picker's light probes vector for which to start including lights.
LightingPass
 Inheritedmaterial : MaterialBase
The material to which this pass belongs.
MaterialPassBase
 Inheritedmipmap : Boolean
[override] Defines whether any used textures should use mipmapping.
CompiledPass
 InheritedneedFragmentAnimation : Boolean
[read-only]
MaterialPassBase
 InheritedneedUVAnimation : Boolean
[read-only] Indicates whether the pass requires any UV animatin code.
MaterialPassBase
 InheritednormalMap : Texture2DBase
The normal map to modulate the direction of the surface for each texel.
CompiledPass
 InheritednormalMethod : BasicNormalMethod
The method used to generate the per-pixel normals.
CompiledPass
 InheritednumUsedFragmentConstants : uint
[read-only] The amount of used fragment constants in the fragment code.
MaterialPassBase
 InheritednumUsedStreams : uint
[read-only] The amount of used vertex streams in the vertex code.
MaterialPassBase
 InheritednumUsedVaryings : uint
[read-only]
MaterialPassBase
 InheritednumUsedVertexConstants : uint
[read-only] The amount of used vertex constants in the vertex code.
MaterialPassBase
  pointLightsOffset : uint
Indicates the offset in the light picker's point light vector for which to start including lights.
LightingPass
 InheritedpreserveAlpha : Boolean
Indicates whether the output alpha value should remain unchanged compared to the material's original alpha.
CompiledPass
 InheritedrenderToTexture : Boolean
[read-only] Specifies whether this pass renders to texture
MaterialPassBase
 Inheritedrepeat : Boolean
Defines whether textures should be tiled.
MaterialPassBase
 InheritedshadowMethod : ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered.
CompiledPass
 Inheritedsmooth : Boolean
Defines whether smoothing should be applied to any used textures.
MaterialPassBase
 InheritedspecularLightSources : uint
Define which light source types to use for specular reflections.
CompiledPass
 InheritedspecularMethod : BasicSpecularMethod
The method that provides the specular lighting contribution.
CompiledPass
 InheritedwriteDepth : Boolean
Indicate whether this pass should write to the depth buffer or not.
MaterialPassBase
Protected Properties
 PropertyDefined By
 Inherited_alphaPremultiplied : Boolean
MaterialPassBase
 Inherited_ambientLightB : Number
CompiledPass
 Inherited_ambientLightG : Number
CompiledPass
 Inherited_ambientLightR : Number
CompiledPass
 Inherited_animatableAttributes : Vector.<String>
MaterialPassBase
 Inherited_animateUVs : Boolean
CompiledPass
 Inherited_animationSet : IAnimationSet
MaterialPassBase
 Inherited_animationTargetRegisters : Vector.<String>
MaterialPassBase
 Inherited_blendFactorDest : String = zero
MaterialPassBase
 Inherited_blendFactorSource : String = one
MaterialPassBase
 Inherited_cameraPositionIndex : int
CompiledPass
 Inherited_commonsDataIndex : int
CompiledPass
 Inherited_compiler : ShaderCompiler
CompiledPass
 Inherited_defaultCulling : String = back
MaterialPassBase
 Inherited_depthCompareMode : String = lessEqual
MaterialPassBase
 Inherited_diffuseLightSources : uint = 0x03
CompiledPass
 Inherited_enableBlending : Boolean
MaterialPassBase
 Inherited_enableLightFallOff : Boolean = true
CompiledPass
 Inherited_fragmentConstantData : Vector.<Number>
CompiledPass
 Inherited_fragmentLightCode : String
CompiledPass
 Inherited_framentPostLightCode : String
CompiledPass
 Inherited_lightFragmentConstantIndex : int
CompiledPass
 Inherited_lightPicker : LightPickerBase
MaterialPassBase
 Inherited_lightProbeDiffuseIndices : Vector.<uint>
CompiledPass
 Inherited_lightProbeSpecularIndices : Vector.<uint>
CompiledPass
 Inherited_material : MaterialBase
MaterialPassBase
 Inherited_methodSetup : ShaderMethodSetup
CompiledPass
 Inherited_mipmap : Boolean = true
MaterialPassBase
 Inherited_needFragmentAnimation : Boolean
MaterialPassBase
 Inherited_needUVAnimation : Boolean
MaterialPassBase
 Inherited_normalBufferIndex : int
CompiledPass
 Inherited_numDirectionalLights : uint
CompiledPass
 Inherited_numLightProbes : uint
CompiledPass
 Inherited_numPointLights : uint
CompiledPass
 Inherited_numUsedFragmentConstants : uint
MaterialPassBase
 Inherited_numUsedStreams : uint
MaterialPassBase
 Inherited_numUsedTextures : uint
MaterialPassBase
 Inherited_numUsedVaryings : uint
MaterialPassBase
 Inherited_numUsedVertexConstants : uint
MaterialPassBase
 Inherited_preserveAlpha : Boolean = true
CompiledPass
 Inherited_probeWeightsIndex : int
CompiledPass
 Inherited_repeat : Boolean = false
MaterialPassBase
 Inherited_sceneMatrixIndex : int
CompiledPass
 Inherited_sceneNormalMatrixIndex : int
CompiledPass
 Inherited_secondaryUVBufferIndex : int
CompiledPass
 Inherited_shadedTarget : String = ft0
MaterialPassBase
 Inherited_smooth : Boolean = true
MaterialPassBase
 Inherited_specularLightSources : uint = 0x01
CompiledPass
 Inherited_tangentBufferIndex : int
CompiledPass
 Inherited_usesNormals : Boolean
CompiledPass
 Inherited_usingSpecularMethod : Boolean
CompiledPass
 Inherited_uvBufferIndex : int
CompiledPass
 Inherited_UVSource : String
MaterialPassBase
 Inherited_UVTarget : String
MaterialPassBase
 Inherited_uvTransformIndex : int
CompiledPass
 Inherited_vertexCode : String
CompiledPass
 Inherited_vertexConstantData : Vector.<Number>
CompiledPass
 Inherited_writeDepth : Boolean = true
MaterialPassBase
Public Methods
 MethodDefined By
  
Creates a new LightingPass objects.
LightingPass
 Inherited
dispose():void
[override] Cleans up any resources used by the current object.
CompiledPass
 Inherited
setBlendMode(value:String):void
The blend mode to use when drawing this renderable.
MaterialPassBase
Protected Methods
 MethodDefined By
 Inherited
addPasses(passes:Vector.<MaterialPassBase>):void
Adds internal passes to the material.
CompiledPass
 Inherited
Adds any possible passes needed by the used methods.
CompiledPass
 Inherited
cleanUp():void
Cleans up the after compiling.
CompiledPass
  
[override] Factory method to create a concrete compiler object for this pass.
LightingPass
 Inherited
Initializes commonly required constant values.
CompiledPass
 Inherited
initCompiler(profile:String):void
Initializes the compiler for this pass.
CompiledPass
 Inherited
Initializes the default UV transformation matrix.
CompiledPass
  
[override] Updates constant data render state used by the lights.
LightingPass
  
[override] Implemented by subclasses if the pass uses lights to update the shader.
LightingPass
 Inherited
Updates method constants if they have changed.
CompiledPass
  
updateProbes(stage3DProxy:Stage3DProxy):void
[override] Updates constant data render state used by the light probes.
LightingPass
  
[override] Updates the indices for various registers.
LightingPass
  
[override] Copies the shader's properties from the compiler.
LightingPass
 Inherited
usesLights():Boolean
Indicates whether the shader uses any lights.
CompiledPass
 Inherited
usesProbes():Boolean
Indicates whether the shader uses any light probes.
CompiledPass
Property Detail
directionalLightsOffsetproperty
directionalLightsOffset:uint

Indicates the offset in the light picker's directional light vector for which to start including lights. This needs to be set before the light picker is assigned.


Implementation
    public function get directionalLightsOffset():uint
    public function set directionalLightsOffset(value:uint):void
includeCastersproperty 
includeCasters:Boolean

Indicates whether or not shadow casting lights need to be included.


Implementation
    public function get includeCasters():Boolean
    public function set includeCasters(value:Boolean):void
lightProbesOffsetproperty 
lightProbesOffset:uint

Indicates the offset in the light picker's light probes vector for which to start including lights. This needs to be set before the light picker is assigned.


Implementation
    public function get lightProbesOffset():uint
    public function set lightProbesOffset(value:uint):void
pointLightsOffsetproperty 
pointLightsOffset:uint

Indicates the offset in the light picker's point light vector for which to start including lights. This needs to be set before the light picker is assigned.


Implementation
    public function get pointLightsOffset():uint
    public function set pointLightsOffset(value:uint):void
Constructor Detail
LightingPass()Constructor
public function LightingPass(material:MaterialBase)

Creates a new LightingPass objects.

Parameters
material:MaterialBase — The material to which this pass belongs.
Method Detail
activate()method
override arcane function activate(stage3DProxy:Stage3DProxy, camera:Camera3D):void

Parameters

stage3DProxy:Stage3DProxy
 
camera:Camera3D

createCompiler()method 
override protected function createCompiler(profile:String):ShaderCompiler

Factory method to create a concrete compiler object for this pass.

Parameters

profile:String — The compatibility profile used by the renderer.

Returns
ShaderCompiler
render()method 
override arcane function render(renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D, viewProjection:Matrix3D):void

Parameters

renderable:IRenderable
 
stage3DProxy:Stage3DProxy
 
camera:Camera3D
 
viewProjection:Matrix3D

updateLightConstants()method 
override protected function updateLightConstants():void

Updates constant data render state used by the lights. This method is optional for subclasses to implement.

updateLights()method 
override protected function updateLights():void

Implemented by subclasses if the pass uses lights to update the shader.

updateProbes()method 
override protected function updateProbes(stage3DProxy:Stage3DProxy):void

Updates constant data render state used by the light probes. This method is optional for subclasses to implement.

Parameters

stage3DProxy:Stage3DProxy

updateRegisterIndices()method 
override protected function updateRegisterIndices():void

Updates the indices for various registers.

updateShaderProperties()method 
override protected function updateShaderProperties():void

Copies the shader's properties from the compiler.