Packageaway3d.materials.methods
Classpublic class RefractionEnvMapMethod
InheritanceRefractionEnvMapMethod Inheritance EffectMethodBase Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher

RefractionEnvMapMethod provides a method to add refracted transparency based on cube maps.



Public Properties
 PropertyDefined By
  alpha : Number
The amount of transparency of the object.
RefractionEnvMapMethod
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 InheritedassetType : String
[read-only] The type of the asset.
EffectMethodBase
  dispersionB : Number
The amount of chromatic dispersion of the blue channel.
RefractionEnvMapMethod
  dispersionG : Number
The amount of chromatic dispersion of the green channel.
RefractionEnvMapMethod
  dispersionR : Number
The amount of chromatic dispersion of the red channel.
RefractionEnvMapMethod
  envMap : CubeTextureBase
The cube environment map to use for the refraction.
RefractionEnvMapMethod
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
 InheritedoriginalName : String
[read-only] The original name used for this asset in the resource (e.g.
NamedAssetBase
 Inheritedpasses : Vector.<MaterialPassBase>
[read-only] Any passes required that render to a texture used by this method.
ShadingMethodBase
  refractionIndex : Number
The refractive index of the material.
RefractionEnvMapMethod
Protected Properties
 PropertyDefined By
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
RefractionEnvMapMethod(envMap:CubeTextureBase, refractionIndex:Number = .1, dispersionR:Number = 0, dispersionG:Number = 0, dispersionB:Number = 0)
Creates a new RefractionEnvMapMethod object.
RefractionEnvMapMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
 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
 Inherited
resetAssetPath(name:String, ns:String = null, overrideOriginal:Boolean = true):void
NamedAssetBase
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
A helper method that generates standard code for sampling from a cube texture.
ShadingMethodBase
 Inherited
Marks the shader program as invalid, so it will be recompiled before the next render.
ShadingMethodBase
Public Constants
 ConstantDefined By
 InheritedDEFAULT_NAMESPACE : String = default
[static]
NamedAssetBase
Property Detail
alphaproperty
alpha:Number

The amount of transparency of the object. Warning: the alpha applies to the refracted color, not the actual material. A value of 1 will make it appear fully transparent.


Implementation
    public function get alpha():Number
    public function set alpha(value:Number):void
dispersionBproperty 
dispersionB:Number

The amount of chromatic dispersion of the blue channel. Defaults to 0 (none).


Implementation
    public function get dispersionB():Number
    public function set dispersionB(value:Number):void
dispersionGproperty 
dispersionG:Number

The amount of chromatic dispersion of the green channel. Defaults to 0 (none).


Implementation
    public function get dispersionG():Number
    public function set dispersionG(value:Number):void
dispersionRproperty 
dispersionR:Number

The amount of chromatic dispersion of the red channel. Defaults to 0 (none).


Implementation
    public function get dispersionR():Number
    public function set dispersionR(value:Number):void
envMapproperty 
envMap:CubeTextureBase

The cube environment map to use for the refraction.


Implementation
    public function get envMap():CubeTextureBase
    public function set envMap(value:CubeTextureBase):void
refractionIndexproperty 
refractionIndex:Number

The refractive index of the material.


Implementation
    public function get refractionIndex():Number
    public function set refractionIndex(value:Number):void
Constructor Detail
RefractionEnvMapMethod()Constructor
public function RefractionEnvMapMethod(envMap:CubeTextureBase, refractionIndex:Number = .1, dispersionR:Number = 0, dispersionG:Number = 0, dispersionB:Number = 0)

Creates a new RefractionEnvMapMethod object. Example values for dispersion are: dispersionR: -0.03, dispersionG: -0.01, dispersionB: = .0015

Parameters
envMap:CubeTextureBase — The environment map containing the refracted scene.
 
refractionIndex:Number (default = .1) — The refractive index of the material.
 
dispersionR:Number (default = 0) — The amount of chromatic dispersion of the red channel. Defaults to 0 (none).
 
dispersionG:Number (default = 0) — The amount of chromatic dispersion of the green channel. Defaults to 0 (none).
 
dispersionB:Number (default = 0) — The amount of chromatic dispersion of the blue channel. Defaults to 0 (none).
Method Detail
activate()method
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void

Parameters

vo:MethodVO
 
stage3DProxy:Stage3DProxy

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

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
initConstants()method 
override 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 
override 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.