Package | away3d.materials.methods |
Class | public class GradientDiffuseMethod |
Inheritance | GradientDiffuseMethod BasicDiffuseMethod LightingMethodBase ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
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 | ||
gradient : Texture2DBase
A texture that contains the light colour based on the angle. | GradientDiffuseMethod | ||
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 | ||
---|---|---|---|
GradientDiffuseMethod(gradient:Texture2DBase)
Creates a new GradientDiffuseMethod object. | GradientDiffuseMethod | ||
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 | ||
---|---|---|---|
[override]
Generate the code that applies the calculated shadow to the diffuse light
| GradientDiffuseMethod | ||
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 |
gradient | property |
gradient:Texture2DBase
A texture that contains the light colour based on the angle. This can be used to change the light colour due to subsurface scattering when the surface faces away from the light.
public function get gradient():Texture2DBase
public function set gradient(value:Texture2DBase):void
GradientDiffuseMethod | () | Constructor |
public function GradientDiffuseMethod(gradient:Texture2DBase)
Creates a new GradientDiffuseMethod object.
Parametersgradient:Texture2DBase — A texture that contains the light colour based on the angle. This can be used to change
the light colour due to subsurface scattering when the surface faces away from the light.
|
activate | () | method |
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
vo:MethodVO | |
stage3DProxy:Stage3DProxy |
applyShadow | () | method |
override 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
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 |
getFragmentPreLightingCode | () | method |
override arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
vo:MethodVO | |
regCache:ShaderRegisterCache |
String |