Packageaway3d.materials.methods
Classpublic class BasicNormalMethod
InheritanceBasicNormalMethod Inheritance ShadingMethodBase Inheritance NamedAssetBase Inheritance flash.events.EventDispatcher
Subclasses HeightMapNormalMethod, SimpleWaterNormalMethod

BasicNormalMethod is the default method for standard tangent-space normal mapping.



Public Properties
 PropertyDefined By
 InheritedassetFullPath : Array
[read-only]
NamedAssetBase
 InheritedassetNamespace : String
[read-only]
NamedAssetBase
 Inheritedid : String
NamedAssetBase
 Inheritedname : String
NamedAssetBase
  normalMap : Texture2DBase
The texture containing the normals per pixel.
BasicNormalMethod
 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
Protected Properties
 PropertyDefined By
  _normalTextureRegister : ShaderRegisterElement
BasicNormalMethod
 Inherited_passes : Vector.<MaterialPassBase>
ShadingMethodBase
 Inherited_sharedRegisters : ShaderRegisterData
ShadingMethodBase
Public Methods
 MethodDefined By
  
Creates a new BasicNormalMethod object.
BasicNormalMethod
 Inherited
assetPathEquals(name:String, ns:String):Boolean
NamedAssetBase
  
[override] Copies the state from a ShadingMethodBase object into the current object.
BasicNormalMethod
  
dispose():void
[override] Cleans up any resources used by the current object.
BasicNormalMethod
 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
_normalTextureRegisterproperty
protected var _normalTextureRegister:ShaderRegisterElement

hasOutputproperty 
hasOutput:Boolean  [read-only]

Indicates if the normal method output is not based on a texture (if not, it will usually always return true) Override if subclasses are different.


Implementation
    arcane function get hasOutput():Boolean
normalMapproperty 
normalMap:Texture2DBase

The texture containing the normals per pixel.


Implementation
    public function get normalMap():Texture2DBase
    public function set normalMap(value:Texture2DBase):void
tangentSpaceproperty 
tangentSpace:Boolean  [read-only]

Indicates whether or not this method outputs normals in tangent space. Override for object-space normals.


Implementation
    arcane function get tangentSpace():Boolean
Constructor Detail
BasicNormalMethod()Constructor
public function BasicNormalMethod()

Creates a new BasicNormalMethod object.

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

copyFrom()method 
override public function copyFrom(method:ShadingMethodBase):void

Copies the state from a ShadingMethodBase object into the current object.

Parameters

method:ShadingMethodBase

dispose()method 
override public function dispose():void

Cleans up any resources used by the current object.

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

Parameters

vo:MethodVO
 
regCache:ShaderRegisterCache
 
targetReg:ShaderRegisterElement

Returns
String
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.