Package | away3d.materials.methods |
Class | public class TerrainDiffuseMethod |
Inheritance | TerrainDiffuseMethod BasicDiffuseMethod LightingMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
alphaThreshold : Number [override]
The minimum alpha value for which pixels should be drawn. | TerrainDiffuseMethod | ||
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
diffuseAlpha : Number
The alpha component of the diffuse reflection. | BasicDiffuseMethod | ||
diffuseColor : uint
The color of the diffuse reflection when not using a texture. | BasicDiffuseMethod | ||
id : String | NamedAssetBase | ||
name : String | NamedAssetBase | ||
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 | ||
texture : Texture2DBase
The bitmapData to use to define the diffuse reflection color per texel. | BasicDiffuseMethod | ||
_totalLightColorReg : ShaderRegisterElement | BasicDiffuseMethod |
Method | Defined By | ||
---|---|---|---|
TerrainDiffuseMethod(splatTextures:Array, blendingTexture:Texture2DBase, tileData:Array)
Creates a new TerrainDiffuseMethod. | TerrainDiffuseMethod | ||
assetPathEquals(name:String, ns:String):Boolean | NamedAssetBase | ||
copyFrom(method:ShadingMethodBase):void [override]
Copies the state from a ShadingMethodBase object into the current object. | BasicDiffuseMethod | ||
dispose():void [override]
Cleans up any resources used by the current object. | BasicDiffuseMethod | ||
generateMip(stage3DProxy:Stage3DProxy):void
Forces the creation of the texture. | BasicDiffuseMethod | ||
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void | NamedAssetBase |
Method | Defined By | ||
---|---|---|---|
Generate the code that applies the calculated shadow to the diffuse light
| BasicDiffuseMethod | ||
getSplatSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null):String
Gets the sample code for a single splat. | TerrainDiffuseMethod | ||
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 |
alphaThreshold | property |
alphaThreshold:Number
[override] The minimum alpha value for which pixels should be drawn. This is used for transparency that is either invisible or entirely opaque, often used with textures for foliage, etc. Recommended values are 0 to disable alpha, or 0.5 to create smooth edges. Default value is 0 (disabled).
public function get alphaThreshold():Number
public function set alphaThreshold(value:Number):void
TerrainDiffuseMethod | () | Constructor |
public function TerrainDiffuseMethod(splatTextures:Array, blendingTexture:Texture2DBase, tileData:Array)
Creates a new TerrainDiffuseMethod.
ParameterssplatTextures:Array — An array of Texture2DProxyBase containing the detailed textures to be tiled.
| |
blendingTexture:Texture2DBase — The texture containing the blending data. The red, green, and blue channels contain the blending values for each of the textures in splatTextures, respectively.
| |
tileData:Array — The amount of times each splat texture needs to be tiled. The first entry in the array applies to the base texture, the others to the splats. If omitted, the default value of 50 is assumed for each.
|
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
getFragmentPostLightingCode | () | method |
override arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache | |
targetReg:ShaderRegisterElement |
String |
getSplatSampleCode | () | method |
protected function getSplatSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, texture:TextureProxyBase, uvReg:ShaderRegisterElement = null):String
Gets the sample code for a single splat.
Parameters
vo:MethodVO | |
targetReg:ShaderRegisterElement | |
inputReg:ShaderRegisterElement | |
texture:TextureProxyBase | |
uvReg:ShaderRegisterElement (default = null )
|
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.
|