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
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
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
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
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, 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
 
lightDirReg:ShaderRegisterElement
 
lightColReg:ShaderRegisterElement
 
regCache:ShaderRegisterCache

Returns
String
getFragmentCodePerProbe()method 
arcane function getFragmentCodePerProbe(vo:MethodVO, 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 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