Package | away3d.materials.passes |
Class | public class CompiledPass |
Inheritance | CompiledPass MaterialPassBase flash.events.EventDispatcher |
Subclasses | LightingPass, ShadowCasterPass, SuperShaderPass |
Property | Defined By | ||
---|---|---|---|
alphaPremultiplied : Boolean
Indicates whether visible textures (or other pixels) used by this material have
already been premultiplied. | MaterialPassBase | ||
ambientMethod : BasicAmbientMethod
The method that provides the ambient lighting contribution. | CompiledPass | ||
animateUVs : Boolean
Indicate whether UV coordinates need to be animated using the renderable's transformUV matrix. | CompiledPass | ||
animationRegisterCache : AnimationRegisterCache | MaterialPassBase | ||
animationSet : IAnimationSet
Returns the animation data set adding animations to the material. | MaterialPassBase | ||
bothSides : Boolean
Defines whether or not the material should perform backface culling. | MaterialPassBase | ||
depthCompareMode : String
The depth compare mode used to render the renderables using this material. | MaterialPassBase | ||
diffuseLightSources : uint
Define which light source types to use for diffuse reflections. | CompiledPass | ||
diffuseMethod : BasicDiffuseMethod
The method that provides the diffuse lighting contribution. | CompiledPass | ||
enableLightFallOff : Boolean
Whether or not to use fallOff and radius properties for lights. | CompiledPass | ||
forceSeparateMVP : Boolean
Indicates whether the screen projection should be calculated by forcing a separate scene matrix and
view-projection matrix. | CompiledPass | ||
material : MaterialBase
The material to which this pass belongs. | MaterialPassBase | ||
mipmap : Boolean [override]
Defines whether any used textures should use mipmapping. | CompiledPass | ||
needFragmentAnimation : Boolean [read-only] | MaterialPassBase | ||
needUVAnimation : Boolean [read-only]
Indicates whether the pass requires any UV animatin code. | MaterialPassBase | ||
normalMap : Texture2DBase
The normal map to modulate the direction of the surface for each texel. | CompiledPass | ||
normalMethod : BasicNormalMethod
The method used to generate the per-pixel normals. | CompiledPass | ||
numUsedFragmentConstants : uint [read-only]
The amount of used fragment constants in the fragment code. | MaterialPassBase | ||
numUsedStreams : uint [read-only]
The amount of used vertex streams in the vertex code. | MaterialPassBase | ||
numUsedVaryings : uint [read-only] | MaterialPassBase | ||
numUsedVertexConstants : uint [read-only]
The amount of used vertex constants in the vertex code. | MaterialPassBase | ||
preserveAlpha : Boolean
Indicates whether the output alpha value should remain unchanged compared to the material's original alpha. | CompiledPass | ||
renderToTexture : Boolean [read-only]
Specifies whether this pass renders to texture
| MaterialPassBase | ||
repeat : Boolean
Defines whether textures should be tiled. | MaterialPassBase | ||
shadowMethod : ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. | CompiledPass | ||
smooth : Boolean
Defines whether smoothing should be applied to any used textures. | MaterialPassBase | ||
specularLightSources : uint
Define which light source types to use for specular reflections. | CompiledPass | ||
specularMethod : BasicSpecularMethod
The method that provides the specular lighting contribution. | CompiledPass | ||
writeDepth : Boolean
Indicate whether this pass should write to the depth buffer or not. | MaterialPassBase |
Method | Defined By | ||
---|---|---|---|
CompiledPass(material:MaterialBase)
Creates a new CompiledPass object. | CompiledPass | ||
dispose():void [override]
Cleans up any resources used by the current object. | CompiledPass | ||
setBlendMode(value:String):void
The blend mode to use when drawing this renderable. | MaterialPassBase |
Method | Defined By | ||
---|---|---|---|
addPasses(passes:Vector.<MaterialPassBase>):void
Adds internal passes to the material. | CompiledPass | ||
addPassesFromMethods():void
Adds any possible passes needed by the used methods. | CompiledPass | ||
cleanUp():void
Cleans up the after compiling. | CompiledPass | ||
createCompiler(profile:String):ShaderCompiler
Factory method to create a concrete compiler object for this pass. | CompiledPass | ||
initCommonsData():void
Initializes commonly required constant values. | CompiledPass | ||
initCompiler(profile:String):void
Initializes the compiler for this pass. | CompiledPass | ||
initUVTransformData():void
Initializes the default UV transformation matrix. | CompiledPass | ||
updateLightConstants():void
Updates constant data render state used by the lights. | CompiledPass | ||
updateLights():void
Implemented by subclasses if the pass uses lights to update the shader. | MaterialPassBase | ||
updateMethodConstants():void
Updates method constants if they have changed. | CompiledPass | ||
updateProbes(stage3DProxy:Stage3DProxy):void
Updates constant data render state used by the light probes. | CompiledPass | ||
updateRegisterIndices():void
Updates the indices for various registers. | CompiledPass | ||
updateShaderProperties():void
Copies the shader's properties from the compiler. | CompiledPass | ||
usesLights():Boolean
Indicates whether the shader uses any lights. | CompiledPass | ||
usesProbes():Boolean
Indicates whether the shader uses any light probes. | CompiledPass |
_ambientLightB | property |
protected var _ambientLightB:Number
_ambientLightG | property |
protected var _ambientLightG:Number
_ambientLightR | property |
protected var _ambientLightR:Number
_animateUVs | property |
protected var _animateUVs:Boolean
_cameraPositionIndex | property |
protected var _cameraPositionIndex:int
_commonsDataIndex | property |
protected var _commonsDataIndex:int
_compiler | property |
protected var _compiler:ShaderCompiler
_diffuseLightSources | property |
protected var _diffuseLightSources:uint = 0x03
_enableLightFallOff | property |
protected var _enableLightFallOff:Boolean = true
_fragmentConstantData | property |
protected var _fragmentConstantData:Vector.<Number>
_fragmentLightCode | property |
protected var _fragmentLightCode:String
_framentPostLightCode | property |
protected var _framentPostLightCode:String
_lightFragmentConstantIndex | property |
protected var _lightFragmentConstantIndex:int
_lightProbeDiffuseIndices | property |
protected var _lightProbeDiffuseIndices:Vector.<uint>
_lightProbeSpecularIndices | property |
protected var _lightProbeSpecularIndices:Vector.<uint>
_methodSetup | property |
protected var _methodSetup:ShaderMethodSetup
_normalBufferIndex | property |
protected var _normalBufferIndex:int
_numDirectionalLights | property |
protected var _numDirectionalLights:uint
_numLightProbes | property |
protected var _numLightProbes:uint
_numPointLights | property |
protected var _numPointLights:uint
_passes | property |
arcane var _passes:Vector.<MaterialPassBase>
_passesDirty | property |
arcane var _passesDirty:Boolean
_preserveAlpha | property |
protected var _preserveAlpha:Boolean = true
_probeWeightsIndex | property |
protected var _probeWeightsIndex:int
_sceneMatrixIndex | property |
protected var _sceneMatrixIndex:int
_sceneNormalMatrixIndex | property |
protected var _sceneNormalMatrixIndex:int
_secondaryUVBufferIndex | property |
protected var _secondaryUVBufferIndex:int
_specularLightSources | property |
protected var _specularLightSources:uint = 0x01
_tangentBufferIndex | property |
protected var _tangentBufferIndex:int
_usesNormals | property |
protected var _usesNormals:Boolean
_usingSpecularMethod | property |
protected var _usingSpecularMethod:Boolean
_uvBufferIndex | property |
protected var _uvBufferIndex:int
_uvTransformIndex | property |
protected var _uvTransformIndex:int
_vertexCode | property |
protected var _vertexCode:String
_vertexConstantData | property |
protected var _vertexConstantData:Vector.<Number>
ambientMethod | property |
ambientMethod:BasicAmbientMethod
The method that provides the ambient lighting contribution. Defaults to BasicAmbientMethod.
public function get ambientMethod():BasicAmbientMethod
public function set ambientMethod(value:BasicAmbientMethod):void
animateUVs | property |
animateUVs:Boolean
Indicate whether UV coordinates need to be animated using the renderable's transformUV matrix.
public function get animateUVs():Boolean
public function set animateUVs(value:Boolean):void
diffuseLightSources | property |
diffuseLightSources:uint
Define which light source types to use for diffuse reflections. This allows choosing between regular lights and/or light probes for diffuse reflections.
public function get diffuseLightSources():uint
public function set diffuseLightSources(value:uint):void
See also
diffuseMethod | property |
diffuseMethod:BasicDiffuseMethod
The method that provides the diffuse lighting contribution. Defaults to BasicDiffuseMethod.
public function get diffuseMethod():BasicDiffuseMethod
public function set diffuseMethod(value:BasicDiffuseMethod):void
enableLightFallOff | property |
enableLightFallOff:Boolean
Whether or not to use fallOff and radius properties for lights. This can be used to improve performance and compatibility for constrained mode.
public function get enableLightFallOff():Boolean
public function set enableLightFallOff(value:Boolean):void
forceSeparateMVP | property |
forceSeparateMVP:Boolean
Indicates whether the screen projection should be calculated by forcing a separate scene matrix and view-projection matrix. This is used to prevent rounding errors when using multiple passes with different projection code.
public function get forceSeparateMVP():Boolean
public function set forceSeparateMVP(value:Boolean):void
mipmap | property |
mipmap:Boolean
[override] Defines whether any used textures should use mipmapping.
public function get mipmap():Boolean
public function set mipmap(value:Boolean):void
normalMap | property |
normalMap:Texture2DBase
The normal map to modulate the direction of the surface for each texel. The default normal method expects tangent-space normal maps, but others could expect object-space maps.
public function get normalMap():Texture2DBase
public function set normalMap(value:Texture2DBase):void
normalMethod | property |
normalMethod:BasicNormalMethod
The method used to generate the per-pixel normals. Defaults to BasicNormalMethod.
public function get normalMethod():BasicNormalMethod
public function set normalMethod(value:BasicNormalMethod):void
numDirectionalLights | property |
numDirectionalLights:uint
[read-only] The amount of directional lights that need to be supported.
arcane function get numDirectionalLights():uint
numLightProbes | property |
numLightProbes:uint
[read-only] The amount of light probes that need to be supported.
arcane function get numLightProbes():uint
numPointLights | property |
numPointLights:uint
[read-only] The amount of point lights that need to be supported.
arcane function get numPointLights():uint
preserveAlpha | property |
preserveAlpha:Boolean
Indicates whether the output alpha value should remain unchanged compared to the material's original alpha.
public function get preserveAlpha():Boolean
public function set preserveAlpha(value:Boolean):void
shadowMethod | property |
shadowMethod:ShadowMapMethodBase
The method used to render shadows cast on this surface, or null if no shadows are to be rendered. Defaults to null.
public function get shadowMethod():ShadowMapMethodBase
public function set shadowMethod(value:ShadowMapMethodBase):void
specularLightSources | property |
specularLightSources:uint
Define which light source types to use for specular reflections. This allows choosing between regular lights and/or light probes for specular reflections.
public function get specularLightSources():uint
public function set specularLightSources(value:uint):void
See also
specularMethod | property |
specularMethod:BasicSpecularMethod
The method that provides the specular lighting contribution. Defaults to BasicSpecularMethod.
public function get specularMethod():BasicSpecularMethod
public function set specularMethod(value:BasicSpecularMethod):void
CompiledPass | () | Constructor |
public function CompiledPass(material:MaterialBase)
Creates a new CompiledPass object.
Parametersmaterial:MaterialBase — The material to which this pass belongs.
|
activate | () | method |
override arcane function activate(stage3DProxy:Stage3DProxy, camera:Camera3D):void
Parameters
stage3DProxy:Stage3DProxy | |
camera:Camera3D |
addPasses | () | method |
protected function addPasses(passes:Vector.<MaterialPassBase>):void
Adds internal passes to the material.
Parameters
passes:Vector.<MaterialPassBase> — The passes to add.
|
addPassesFromMethods | () | method |
protected function addPassesFromMethods():void
Adds any possible passes needed by the used methods.
cleanUp | () | method |
protected function cleanUp():void
Cleans up the after compiling.
createCompiler | () | method |
protected function createCompiler(profile:String):ShaderCompiler
Factory method to create a concrete compiler object for this pass.
Parameters
profile:String — The compatibility profile used by the renderer.
|
ShaderCompiler |
deactivate | () | method |
override arcane function deactivate(stage3DProxy:Stage3DProxy):void
Parameters
stage3DProxy:Stage3DProxy |
dispose | () | method |
override public function dispose():void
Cleans up any resources used by the current object.
getFragmentCode | () | method |
override arcane function getFragmentCode(animatorCode:String):String
Returns the fragment AGAL code for the material.
Parameters
animatorCode:String |
String |
getVertexCode | () | method |
override arcane function getVertexCode():String
Returns the vertex AGAL code for the material.
ReturnsString |
initCommonsData | () | method |
protected function initCommonsData():void
Initializes commonly required constant values.
initCompiler | () | method |
protected function initCompiler(profile:String):void
Initializes the compiler for this pass.
Parameters
profile:String — The compatibility profile used by the renderer.
|
initUVTransformData | () | method |
protected function initUVTransformData():void
Initializes the default UV transformation matrix.
invalidateShaderProgram | () | method |
override arcane function invalidateShaderProgram(updateMaterial:Boolean = true):void
Marks the shader program as invalid, so it will be recompiled before the next render.
Parameters
updateMaterial:Boolean (default = true ) — Indicates whether the invalidation should be performed on the entire material. Should always pass "true" unless it's called from the material itself.
|
render | () | method |
override arcane function render(renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D, viewProjection:Matrix3D):void
Parameters
renderable:IRenderable | |
stage3DProxy:Stage3DProxy | |
camera:Camera3D | |
viewProjection:Matrix3D |
updateLightConstants | () | method |
protected function updateLightConstants():void
Updates constant data render state used by the lights. This method is optional for subclasses to implement.
updateMethodConstants | () | method |
protected function updateMethodConstants():void
Updates method constants if they have changed.
updateProbes | () | method |
protected function updateProbes(stage3DProxy:Stage3DProxy):void
Updates constant data render state used by the light probes. This method is optional for subclasses to implement.
Parameters
stage3DProxy:Stage3DProxy |
updateProgram | () | method |
override arcane function updateProgram(stage3DProxy:Stage3DProxy):void
Compiles the shader program.
Parameters
stage3DProxy:Stage3DProxy — An optional register that contains an amount by which to inflate the model (used in single object depth map rendering).
|
updateRegisterIndices | () | method |
protected function updateRegisterIndices():void
Updates the indices for various registers.
updateShaderProperties | () | method |
protected function updateShaderProperties():void
Copies the shader's properties from the compiler.
usesLights | () | method |
protected function usesLights():Boolean
Indicates whether the shader uses any lights.
ReturnsBoolean |
usesProbes | () | method |
protected function usesProbes():Boolean
Indicates whether the shader uses any light probes.
ReturnsBoolean |