Packageaway3d.materials.methods
Classpublic class ShadowMapMethodBase
InheritanceShadowMapMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Implements IAsset
Subclasses CascadeShadowMapMethod, SimpleShadowMapMethodBase

ShadowMapMethodBase provides an abstract base method for shadow map methods.



Public Properties
 PropertyDefined By
  alpha : Number
The "transparency" of the shadows.
ShadowMapMethodBase
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
  assetType : String
[read-only] The type of the asset.
ShadowMapMethodBase
  castingLight : LightBase
[read-only] The light casting the shadows.
ShadowMapMethodBase
  epsilon : Number
A small value to counter floating point precision errors when comparing values in the shadow map with the calculated depth value.
ShadowMapMethodBase
 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
Protected Properties
 PropertyDefined By
  _alpha : Number = 1
ShadowMapMethodBase
  _castingLight : LightBase
ShadowMapMethodBase
  _epsilon : Number = .02
ShadowMapMethodBase
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
  _shadowMapper : ShadowMapperBase
ShadowMapMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
Creates a new ShadowMapMethodBase object.
ShadowMapMethodBase
 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
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
_alphaproperty
protected var _alpha:Number = 1

_castingLightproperty 
protected var _castingLight:LightBase

_epsilonproperty 
protected var _epsilon:Number = .02

_shadowMapperproperty 
protected var _shadowMapper:ShadowMapperBase

alphaproperty 
alpha:Number

The "transparency" of the shadows. This allows making shadows less strong.


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
assetTypeproperty 
assetType:String  [read-only]

The type of the asset.


Implementation
    public function get assetType():String
castingLightproperty 
castingLight:LightBase  [read-only]

The light casting the shadows.


Implementation
    public function get castingLight():LightBase
epsilonproperty 
epsilon:Number

A small value to counter floating point precision errors when comparing values in the shadow map with the calculated depth value. Increase this if shadow banding occurs, decrease it if the shadow seems to be too detached.


Implementation
    public function get epsilon():Number
    public function set epsilon(value:Number):void
Constructor Detail
ShadowMapMethodBase()Constructor
public function ShadowMapMethodBase(castingLight:LightBase)

Creates a new ShadowMapMethodBase object.

Parameters
castingLight:LightBase — The light used to cast shadows.
Method Detail
getFragmentCode()method
arcane function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String