MaterialPassBase provides an abstract base class for material shader passes. A material pass constitutes at least
a render call per required renderable.
protected var _alphaPremultiplied:Boolean
protected var _animatableAttributes:Vector.<String>
protected var _animationSet:IAnimationSet
protected var _animationTargetRegisters:Vector.<String>
protected var _blendFactorDest:String = zero
protected var _blendFactorSource:String = one
protected var _defaultCulling:String = back
protected var _depthCompareMode:String = lessEqual
protected var _enableBlending:Boolean
protected var _lightPicker:LightPickerBase
protected var _material:MaterialBase
protected var _mipmap:Boolean = true
protected var _needFragmentAnimation:Boolean
protected var _needUVAnimation:Boolean
protected var _numUsedFragmentConstants:uint
protected var _numUsedStreams:uint
protected var _numUsedTextures:uint
protected var _numUsedVaryings:uint
protected var _numUsedVertexConstants:uint
arcane var _program3Dids:Vector.<int>
arcane var _program3Ds:Vector.<Program3D>
protected var _repeat:Boolean = false
protected var _shadedTarget:String = ft0
protected var _smooth:Boolean = true
protected var _UVSource:String
protected var _UVTarget:String
protected var _writeDepth:Boolean = true
alphaPremultiplied:Boolean
Indicates whether visible textures (or other pixels) used by this material have
already been premultiplied. Toggle this if you are seeing black halos around your
blended alpha edges.
Implementation public function get alphaPremultiplied():Boolean
public function set alphaPremultiplied(value:Boolean):void
public var animationRegisterCache:AnimationRegisterCache
animationSet:IAnimationSet
Returns the animation data set adding animations to the material.
Implementation public function get animationSet():IAnimationSet
public function set animationSet(value:IAnimationSet):void
bothSides:Boolean
Defines whether or not the material should perform backface culling.
Implementation public function get bothSides():Boolean
public function set bothSides(value:Boolean):void
depthCompareMode:String
The depth compare mode used to render the renderables using this material.
Implementation public function get depthCompareMode():String
public function set depthCompareMode(value:String):void
See also
flash.display3D.Context3DCompareMode
lightPicker:LightPickerBase
The light picker used by the material to provide lights to the material if it supports lighting.
Implementation arcane function get lightPicker():LightPickerBase
arcane function set lightPicker(value:LightPickerBase):void
See also
material:MaterialBase
The material to which this pass belongs.
Implementation public function get material():MaterialBase
public function set material(value:MaterialBase):void
mipmap:Boolean
Defines whether any used textures should use mipmapping.
Implementation public function get mipmap():Boolean
public function set mipmap(value:Boolean):void
needFragmentAnimation:Boolean
[read-only]
Implementation public function get needFragmentAnimation():Boolean
needUVAnimation:Boolean
[read-only]
Indicates whether the pass requires any UV animatin code.
Implementation public function get needUVAnimation():Boolean
numUsedFragmentConstants:uint
[read-only]
The amount of used fragment constants in the fragment code. Used by the animation code generation to know from which index on registers are available.
Implementation public function get numUsedFragmentConstants():uint
numUsedStreams:uint
[read-only]
The amount of used vertex streams in the vertex code. Used by the animation code generation to know from which index on streams are available.
Implementation public function get numUsedStreams():uint
numUsedVaryings:uint
[read-only]
Implementation public function get numUsedVaryings():uint
numUsedVertexConstants:uint
[read-only]
The amount of used vertex constants in the vertex code. Used by the animation code generation to know from which index on registers are available.
Implementation public function get numUsedVertexConstants():uint
renderToTexture:Boolean
[read-only]
Specifies whether this pass renders to texture
Implementation public function get renderToTexture():Boolean
repeat:Boolean
Defines whether textures should be tiled.
Implementation public function get repeat():Boolean
public function set repeat(value:Boolean):void
smooth:Boolean
Defines whether smoothing should be applied to any used textures.
Implementation public function get smooth():Boolean
public function set smooth(value:Boolean):void
writeDepth:Boolean
Indicate whether this pass should write to the depth buffer or not. Ignored when blending is enabled.
Implementation public function get writeDepth():Boolean
public function set writeDepth(value:Boolean):void
public function MaterialPassBase(renderToTexture:Boolean = false)
Creates a new MaterialPassBase object.
Parameters | renderToTexture:Boolean (default = false ) — Indicates whether this pass is a render-to-texture pass.
|
public function dispose():void
Cleans up any resources used by the current object.
arcane function getFragmentCode(fragmentAnimatorCode:String):String
Returns the fragment AGAL code for the material.
Parameters
| fragmentAnimatorCode:String |
Returns arcane function getVertexCode():String
Returns the vertex AGAL code for the material.
Returns 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.
|
public function setBlendMode(value:String):void
The blend mode to use when drawing this renderable. The following blend modes are supported:
- BlendMode.NORMAL: No blending, unless the material inherently needs it
- BlendMode.LAYER: Force blending. This will draw the object the same as NORMAL, but without writing depth writes.
- BlendMode.MULTIPLY
- BlendMode.ADD
- BlendMode.ALPHA
Parameters
protected function updateLights():void
Implemented by subclasses if the pass uses lights to update the shader.
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).
|
Thu Jul 11 2013, 08:55 PM +01:00