Package | away3d.materials.methods |
Class | public class ShadingMethodBase |
Inheritance | ShadingMethodBase NamedAssetBase flash.events.EventDispatcher |
Subclasses | BasicAmbientMethod, BasicNormalMethod, EffectMethodBase, LightingMethodBase, ShadowMapMethodBase |
Property | Defined By | ||
---|---|---|---|
assetFullPath : Array [read-only] | NamedAssetBase | ||
assetNamespace : String [read-only] | NamedAssetBase | ||
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 |
Property | Defined By | ||
---|---|---|---|
_passes : Vector.<MaterialPassBase> | ShadingMethodBase | ||
_sharedRegisters : ShaderRegisterData | ShadingMethodBase |
Method | Defined By | ||
---|---|---|---|
Create a new ShadingMethodBase object. | ShadingMethodBase | ||
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 | ||
---|---|---|---|
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 |
_passes | property |
protected var _passes:Vector.<MaterialPassBase>
_sharedRegisters | property |
protected var _sharedRegisters:ShaderRegisterData
passes | property |
passes:Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
public function get passes():Vector.<MaterialPassBase>
sharedRegisters | property |
sharedRegisters:ShaderRegisterData
The shared registers created by the compiler and possibly used by methods.
arcane function get sharedRegisters():ShaderRegisterData
arcane function set sharedRegisters(value:ShaderRegisterData):void
ShadingMethodBase | () | Constructor |
public function ShadingMethodBase()
Create a new ShadingMethodBase object.
copyFrom | () | method |
public function copyFrom(method:ShadingMethodBase):void
Copies the state from a ShadingMethodBase object into the current object.
Parameters
method:ShadingMethodBase |
createMethodVO | () | method |
arcane function createMethodVO():MethodVO
Creates a data container that contains material-dependent data. Provided as a factory method so a custom subtype can be overridden when needed.
ReturnsMethodVO |
deactivate | () | method |
arcane function deactivate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Clears the render state for this method.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
stage3DProxy:Stage3DProxy — The Stage3DProxy object currently used for rendering.
|
dispose | () | method |
public function dispose():void
Cleans up any resources used by the current object.
getTex2DSampleCode | () | method |
protected function 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.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
targetReg:ShaderRegisterElement — The register in which to store the sampled colour.
| |
inputReg:ShaderRegisterElement — The texture stream register.
| |
texture:TextureProxyBase — The texture which will be assigned to the given slot.
| |
uvReg:ShaderRegisterElement (default = null ) — An optional uv register if coordinates different from the primary uv coordinates are to be used.
| |
forceWrap:String (default = null ) — If true, texture wrapping is enabled regardless of the material setting.
|
String — The fragment code that performs the sampling.
|
getTexCubeSampleCode | () | method |
protected function 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.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
targetReg:ShaderRegisterElement — The register in which to store the sampled colour.
| |
inputReg:ShaderRegisterElement — The texture stream register.
| |
texture:TextureProxyBase — The cube map which will be assigned to the given slot.
| |
uvReg:ShaderRegisterElement — The direction vector with which to sample the cube map.
|
String |
initConstants | () | method |
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.
|
initVO | () | method |
arcane function initVO(vo:MethodVO):void
Initializes the properties for a MethodVO, including register and texture indices.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
|
invalidateShaderProgram | () | method |
protected function invalidateShaderProgram():void
Marks the shader program as invalid, so it will be recompiled before the next render.
reset | () | method |
arcane function reset():void
Resets the compilation state of the method.
setRenderState | () | method |
arcane function setRenderState(vo:MethodVO, renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D):void
Sets the render state for a single renderable.
Parameters
vo:MethodVO — The MethodVO object linking this method with the pass currently being compiled.
| |
renderable:IRenderable — The renderable currently being rendered.
| |
stage3DProxy:Stage3DProxy — The Stage3DProxy object currently used for rendering.
| |
camera:Camera3D — The camera from which the scene is currently rendered.
|