Packageaway3d.materials.methods
Classpublic class LightingMethodBase
InheritanceLightingMethodBase Inheritance ShadingMethodBase Inheritance flash.events.EventDispatcher
Subclasses BasicDiffuseMethod, BasicSpecularMethod

LightingMethodBase provides an abstract base method for shading methods that uses lights. Used for diffuse and specular shaders only.



Public Properties
 PropertyDefined By
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
 InheritedviewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Protected Properties
 PropertyDefined By
 Inherited_globalPosReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_normalFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_projectionReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_secondaryUVFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_tangentVaryingReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_uvFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirFragmentReg : ShaderRegisterElement
ShadingMethodBase
 Inherited_viewDirVaryingReg : ShaderRegisterElement
ShadingMethodBase
Public Methods
 MethodDefined By
  
LightingMethodBase
 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
Protected Methods
 MethodDefined By
 Inherited
getTexSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, 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
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Property Detail
_modulateMethodproperty
arcane var _modulateMethod:Function

A method that is exposed to wrappers in case the strength needs to be controlled

Constructor Detail
LightingMethodBase()Constructor
public function LightingMethodBase()



Method Detail
getFragmentCodePerLight()method
arcane function getFragmentCodePerLight(vo:MethodVO, lightIndex:int, lightDirReg:ShaderRegisterElement, lightColReg:ShaderRegisterElement, regCache:ShaderRegisterCache):String

Get the fragment shader code that will generate the code relevant to a single light.

Parameters

vo:MethodVO
 
lightIndex:int
 
lightDirReg:ShaderRegisterElement
 
lightColReg:ShaderRegisterElement
 
regCache:ShaderRegisterCache

Returns
String
getFragmentCodePerProbe()method 
arcane function getFragmentCodePerProbe(vo:MethodVO, lightIndex:int, cubeMapReg:ShaderRegisterElement, weightRegister:String, regCache:ShaderRegisterCache):String

Get the fragment shader code that will generate the code relevant to a single light probe object.

Parameters

vo:MethodVO — The index of the light currently processed. This is a continuation of the lightIndex parameter of the getFragmentCodePerLight method.
 
lightIndex:int — The register containing the cube map for the current probe
 
cubeMapReg:ShaderRegisterElement — A string representation of the register + component containing the current weight
 
weightRegister:String — The register cache providing any necessary registers to the shader
 
regCache:ShaderRegisterCache

Returns
String