Package | away3d.materials.methods |
Class | public class BasicDiffuseMethod |
Inheritance | BasicDiffuseMethod LightingMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | CompositeDiffuseMethod, DepthDiffuseMethod, GradientDiffuseMethod, TerrainDiffuseMethod, WrapDiffuseMethod |
Property | Defined By | ||
---|---|---|---|
alphaThreshold : Number
The minimum alpha value for which pixels should be drawn. | BasicDiffuseMethod | ||
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 |
Property | Defined By | ||
---|---|---|---|
_alphaThreshold : Number = 0 | BasicDiffuseMethod | ||
_diffuseInputRegister : ShaderRegisterElement | BasicDiffuseMethod | ||
_isFirstLight : Boolean | BasicDiffuseMethod | ||
_passes : Vector.<MaterialPassBase> | ShadingMethodBase | ||
_shadowRegister : ShaderRegisterElement | BasicDiffuseMethod | ||
_sharedRegisters : ShaderRegisterData | ShadingMethodBase | ||
_useTexture : Boolean | BasicDiffuseMethod |
Method | Defined By | ||
---|---|---|---|
Creates a new BasicDiffuseMethod object. | BasicDiffuseMethod | ||
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 | ||
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 |
protected var _alphaThreshold:Number = 0
_diffuseInputRegister | property |
protected var _diffuseInputRegister:ShaderRegisterElement
_isFirstLight | property |
protected var _isFirstLight:Boolean
_shadowRegister | property |
protected var _shadowRegister:ShaderRegisterElement
_totalLightColorReg | property |
public var _totalLightColorReg:ShaderRegisterElement
_useTexture | property |
protected var _useTexture:Boolean
alphaThreshold | property |
alphaThreshold:Number
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
diffuseAlpha | property |
diffuseAlpha:Number
The alpha component of the diffuse reflection.
public function get diffuseAlpha():Number
public function set diffuseAlpha(value:Number):void
diffuseColor | property |
diffuseColor:uint
The color of the diffuse reflection when not using a texture.
public function get diffuseColor():uint
public function set diffuseColor(value:uint):void
shadowRegister | property |
shadowRegister:ShaderRegisterElement
[write-only] Set internally by the compiler, so the method knows the register containing the shadow calculation.
arcane function set shadowRegister(value:ShaderRegisterElement):void
texture | property |
texture:Texture2DBase
The bitmapData to use to define the diffuse reflection color per texel.
public function get texture():Texture2DBase
public function set texture(value:Texture2DBase):void
useAmbientTexture | property |
useAmbientTexture:Boolean
Set internally if the ambient method uses a texture.
arcane function get useAmbientTexture():Boolean
arcane function set useAmbientTexture(value:Boolean):void
BasicDiffuseMethod | () | Constructor |
public function BasicDiffuseMethod()
Creates a new BasicDiffuseMethod object.
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
applyShadow | () | method |
protected function applyShadow(vo:MethodVO, regCache:ShaderRegisterCache):String
Generate the code that applies the calculated shadow to the diffuse light
Parameters
vo:MethodVO — The MethodVO object for which the compilation is currently happening.
| |
regCache:ShaderRegisterCache — The register cache the compiler is currently using for the register management.
|
String |
cleanCompilationData | () | method |
override arcane function cleanCompilationData():void
copyFrom | () | method |
override public function copyFrom(method:ShadingMethodBase):void
Copies the state from a ShadingMethodBase object into the current object.
Parameters
method:ShadingMethodBase |
dispose | () | method |
override public function dispose():void
Cleans up any resources used by the current object.
generateMip | () | method |
public function generateMip(stage3DProxy:Stage3DProxy):void
Forces the creation of the texture.
Parameters
stage3DProxy:Stage3DProxy — The Stage3DProxy used by the renderer
|
getFragmentCodePerLight | () | method |
override 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 — The MethodVO object containing the method data for the currently compiled material pass.
| |
lightDirReg:ShaderRegisterElement — The register containing the light direction vector.
| |
lightColReg:ShaderRegisterElement — The register containing the light colour.
| |
regCache:ShaderRegisterCache — The register cache used during the compilation.
|
String |
getFragmentCodePerProbe | () | method |
override 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 MethodVO object containing the method data for the currently compiled material pass.
| |
cubeMapReg:ShaderRegisterElement — The register containing the cube map for the current probe
| |
weightRegister:String — A string representation of the register + component containing the current weight
| |
regCache:ShaderRegisterCache — The register cache providing any necessary registers to the shader
|
String |
getFragmentPostLightingCode | () | method |
override arcane function getFragmentPostLightingCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache | |
targetReg:ShaderRegisterElement |
String |
getFragmentPreLightingCode | () | method |
override arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache |
String |
initVO | () | method |