Packageaway3d.materials.methods
Classpublic class LightMapMethod
InheritanceLightMapMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

LightMapMethod provides a method that allows applying a light map texture to the calculated pixel colour. It is different from LightMapDiffuseMethod in that the latter only modulates the diffuse shading value rather than the whole pixel colour.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
EffectMethodBase
  blendMode : String
The blend mode with which the light map should be applied to the lighting result.
LightMapMethod
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
  texture : Texture2DBase
The texture containing the light map.
LightMapMethod
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
LightMapMethod(texture:Texture2DBase, blendMode:String = multiply, useSecondaryUV:Boolean = false)
Creates a new LightMapMethod object.
LightMapMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 Inherited
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
 Inherited
dispose():void
Cleans up any resources used by the current object.
ShadingMethodBase
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
Protected Methods
 MethodDefined By
 Inherited
getTex2DSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null, forceWrap:String = null):String
A helper method that generates standard code for sampling from a texture using the normal uv coordinates.
ShadingMethodBase
 Inherited
A helper method that generates standard code for sampling from a cube texture.
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
  ADD : String = add
[static] Indicates the light map should be added into the calculated shading result.
LightMapMethod
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
  MULTIPLY : String = multiply
[static] Indicates the light map should be multiplied with the calculated shading result.
LightMapMethod
Property Detail
blendModeproperty
blendMode:String

The blend mode with which the light map should be applied to the lighting result.


Implementation
    public function get blendMode():String
    public function set blendMode(value:String):void

See also

LightMapMethod.ADD
LightMapMethod.MULTIPLY
textureproperty 
texture:Texture2DBase

The texture containing the light map.


Implementation
    public function get texture():Texture2DBase
    public function set texture(value:Texture2DBase):void
Constructor Detail
LightMapMethod()Constructor
public function LightMapMethod(texture:Texture2DBase, blendMode:String = multiply, useSecondaryUV:Boolean = false)

Creates a new LightMapMethod object.

Parameters
texture:Texture2DBase — The texture containing the light map.
 
blendMode:String (default = multiply) — The blend mode with which the light map should be applied to the lighting result.
 
useSecondaryUV:Boolean (default = false) — Indicates whether the secondary UV set should be used to map the light map.
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

getFragmentCode()method 
override arcane function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
initVO()method 
override arcane function initVO(vo:MethodVO):void

Initializes the properties for a MethodVO, including register and texture indices.

Parameters

vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.

Constant Detail
ADDConstant
public static const ADD:String = add

Indicates the light map should be added into the calculated shading result.

MULTIPLYConstant 
public static const MULTIPLY:String = multiply

Indicates the light map should be multiplied with the calculated shading result.