Package | away3d.materials.methods |
Class | public class SoftShadowMapMethod |
Inheritance | SoftShadowMapMethod SimpleShadowMapMethodBase ShadowMapMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
alpha : Number
The "transparency" of the shadows. | ShadowMapMethodBase | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : 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 | ||
id : String | NamedAssetBase | ||
name : String | NamedAssetBase | ||
numSamples : int
The amount of samples to take for dithering. | SoftShadowMapMethod | ||
originalName : String [read-only]
The original name used for this asset in the resource (e.g. | NamedAssetBase | ||
passes : Vector.<MaterialPassBase> [read-only]
Any passes required that render to a texture used by this method. | ShadingMethodBase | ||
range : Number
The range in the shadow map in which to distribute the samples. | SoftShadowMapMethod |
Method | Defined By | ||
---|---|---|---|
SoftShadowMapMethod(castingLight:DirectionalLight, numSamples:int = 5, range:Number = 1)
Creates a new BasicDiffuseMethod object. | SoftShadowMapMethod | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
copyFrom(method:ShadingMethodBase):void
Copies the state from a ShadingMethodBase object into the current object. | ShadingMethodBase | ||
dispose():void
Cleans up any resources used by the current object. | ShadingMethodBase | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
Method | Defined By | ||
---|---|---|---|
getPlanarFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String [override]
Gets the fragment code for shadow mapping with a planar shadow map. | SoftShadowMapMethod | ||
Gets the vertex code for shadow mapping with a planar shadow map (fe: directional lights). | SimpleShadowMapMethodBase | ||
getPointFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Gets the fragment code for shadow mapping with a point light. | SimpleShadowMapMethodBase | ||
Gets the vertex code for shadow mapping with a point light. | SimpleShadowMapMethodBase | ||
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 | ||
getTexCubeSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement):String
A helper method that generates standard code for sampling from a cube texture. | ShadingMethodBase | ||
invalidateShaderProgram():void
Marks the shader program as invalid, so it will be recompiled before the next render. | ShadingMethodBase |
numSamples | property |
numSamples:int
The amount of samples to take for dithering. Minimum 1, maximum 32. The actual maximum may depend on the complexity of the shader.
public function get numSamples():int
public function set numSamples(value:int):void
range | property |
range:Number
The range in the shadow map in which to distribute the samples.
public function get range():Number
public function set range(value:Number):void
SoftShadowMapMethod | () | Constructor |
public function SoftShadowMapMethod(castingLight:DirectionalLight, numSamples:int = 5, range:Number = 1)
Creates a new BasicDiffuseMethod object.
ParameterscastingLight:DirectionalLight — The light casting the shadows
| |
numSamples:int (default = 5 ) — The amount of samples to take for dithering. Minimum 1, maximum 32.
| |
range:Number (default = 1 )
|
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
activateForCascade | () | method |
override arcane function activateForCascade(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Sets the method state for cascade shadow mapping.
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
getCascadeFragmentCode | () | method |
override arcane function getCascadeFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, decodeRegister:ShaderRegisterElement, depthTexture:ShaderRegisterElement, depthProjection:ShaderRegisterElement, targetRegister:ShaderRegisterElement):String
Gets the fragment code for combining this method with a cascaded shadow map method.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
regCache:ShaderRegisterCache — The register cache used during the compilation.
| |
decodeRegister:ShaderRegisterElement — The register containing the data to decode the shadow map depth value.
| |
depthTexture:ShaderRegisterElement — The texture containing the shadow map.
| |
depthProjection:ShaderRegisterElement — The projection of the fragment relative to the light.
| |
targetRegister:ShaderRegisterElement — The register to contain the shadow coverage
|
String — |
getPlanarFragmentCode | () | method |
override protected function getPlanarFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Gets the fragment code for shadow mapping with a planar shadow map.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
regCache:ShaderRegisterCache — The register cache used during the compilation.
| |
targetReg:ShaderRegisterElement — The register to contain the shadow coverage
|
String — |
initConstants | () | method |
override arcane function initConstants(vo:MethodVO):void
Initializes unchanging shader constants using the data from a MethodVO.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
|