Package | away3d.materials.methods |
Class | public class TerrainDiffuseMethod |
Inheritance | TerrainDiffuseMethod BasicDiffuseMethod LightingMethodBase ShadingMethodBase flash.events.EventDispatcher |
Property | Defined By | ||
---|---|---|---|
alphaThreshold : Number [override] | TerrainDiffuseMethod | ||
diffuseAlpha : Number
The alpha component of the diffuse reflection. | BasicDiffuseMethod | ||
diffuseColor : uint
The color of the diffuse reflection when not using a texture. | BasicDiffuseMethod | ||
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 | ||
viewDirVaryingReg : ShaderRegisterElement | ShadingMethodBase |
Method | Defined By | ||
---|---|---|---|
TerrainDiffuseMethod(splatTextures:Array, blendingTexture:Texture2DBase, tileData:Array) | TerrainDiffuseMethod | ||
copyFrom(method:ShadingMethodBase):void [override]
Copies the state from a BasicDiffuseMethod object into the current object. | BasicDiffuseMethod | ||
dispose():void [override]
Cleans up any resources used by the current object. | BasicDiffuseMethod | ||
generateMip(stage3DProxy:Stage3DProxy):void | BasicDiffuseMethod | ||
setDetailTexture(detail:Texture2DBase = null, tileData:Array = null, blendFactors:Array = null):void | TerrainDiffuseMethod |
Method | Defined By | ||
---|---|---|---|
getSplatSampleCode(vo:MethodVO, targetReg:ShaderRegisterElement, inputReg:ShaderRegisterElement, uvReg:ShaderRegisterElement = null):String | TerrainDiffuseMethod | ||
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 | ||
invalidateShaderProgram():void
Marks the shader program as invalid, so it will be recompiled before the next render. | ShadingMethodBase |
alphaThreshold | property |
alphaThreshold:Number
[override] public function get alphaThreshold():Number
public function set alphaThreshold(value:Number):void
TerrainDiffuseMethod | () | Constructor |
public function TerrainDiffuseMethod(splatTextures:Array, blendingTexture:Texture2DBase, tileData:Array)
Parameters
splatTextures: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, uvReg:ShaderRegisterElement = null):String
Parameters
vo:MethodVO | |
targetReg:ShaderRegisterElement | |
inputReg:ShaderRegisterElement | |
uvReg:ShaderRegisterElement (default = null )
|
String |
initConstants | () | method |
setDetailTexture | () | method |
public function setDetailTexture(detail:Texture2DBase = null, tileData:Array = null, blendFactors:Array = null):void
Parameters
detail:Texture2DBase (default = null )
| |
tileData:Array (default = null )
| |
blendFactors:Array (default = null )
|