Packageaway3d.materials.methods
Classpublic class ProjectiveTextureMethod
InheritanceProjectiveTextureMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance flash.events.EventDispatcher

ProjectiveTextureMethod is a material method used to project a texture unto the surface of an object. This can be used for various effects apart from acting like a normal projector, such as projecting fake shadows unto a surface, the impact of light coming through a stained glass window, ...



Public Properties
 PropertyDefined By
  mode : String
The blend mode with which the texture is blended unto the object.
ProjectiveTextureMethod
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
  projector : TextureProjector
The TextureProjector object that defines the projection properties as well as the texture.
ProjectiveTextureMethod
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
ProjectiveTextureMethod(projector:TextureProjector, mode:String = multiply)
Creates a new ProjectiveTextureMethod object.
ProjectiveTextureMethod
 Inherited
Copies the state from a ShadingMethodBase object into the current object.
ShadingMethodBase
 Inherited
dispose():void
Cleans up any resources used by the current object.
ShadingMethodBase
Protected Methods
 MethodDefined By
 Inherited
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
 Inherited
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
  ADD : String = add
[static]
ProjectiveTextureMethod
  MIX : String = mix
[static]
ProjectiveTextureMethod
  MULTIPLY : String = multiply
[static]
ProjectiveTextureMethod
Property Detail
modeproperty
mode:String

The blend mode with which the texture is blended unto the object. ProjectiveTextureMethod.MULTIPLY can be used to project shadows. To prevent clamping, the texture's alpha should be white! ProjectiveTextureMethod.ADD can be used to project light, such as a slide projector or light coming through stained glass. To prevent clamping, the texture's alpha should be black! ProjectiveTextureMethod.MIX provides normal alpha blending. To prevent clamping, the texture's alpha should be transparent!


Implementation
    public function get mode():String
    public function set mode(value:String):void
projectorproperty 
projector:TextureProjector

The TextureProjector object that defines the projection properties as well as the texture.


Implementation
    public function get projector():TextureProjector
    public function set projector(value:TextureProjector):void

See also

Constructor Detail
ProjectiveTextureMethod()Constructor
public function ProjectiveTextureMethod(projector:TextureProjector, mode:String = multiply)

Creates a new ProjectiveTextureMethod object.

Parameters
projector:TextureProjector — The TextureProjector object that defines the projection properties as well as the texture.
 
mode:String (default = multiply) — The blend mode with which the texture is blended unto the surface.

See also

Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

cleanCompilationData()method 
override arcane function cleanCompilationData():void

getFragmentCode()method 
override arcane function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
getVertexCode()method 
override arcane function getVertexCode(vo:MethodVO, regCache:ShaderRegisterCache):String

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache

Returns
String
initConstants()method 
override arcane function initConstants(vo:MethodVO):void

Parameters

vo:MethodVO

setRenderState()method 
override arcane function setRenderState(vo:MethodVO, renderable:IRenderable, stage3DProxy:Stage3DProxy, camera:Camera3D):void

Parameters

vo:MethodVO
 
renderable:IRenderable
 
stage3DProxy:Stage3DProxy
 
camera:Camera3D

Constant Detail
ADDConstant
public static const ADD:String = add

MIXConstant 
public static const MIX:String = mix

MULTIPLYConstant 
public static const MULTIPLY:String = multiply