WrapDiffuseMethod is an alternative to BasicDiffuseMethod in which the light is allowed to be "wrapped around" the normally dark area, to some extent.
It can be used as a crude approximation to Oren-Nayar or subsurface scattering.
scatterTexture:Texture2DBase
Implementation public function get scatterTexture():Texture2DBase
public function set scatterTexture(value:Texture2DBase):void
wrapFactor:Number
Implementation public function get wrapFactor():Number
public function set wrapFactor(value:Number):void
public function WrapDiffuseMethod(wrapFactor:Number = .5, scatterTexture:Texture2DBase = null)
Creates a new WrapDiffuseMethod object.
Parameters | wrapFactor:Number (default = .5 ) — A factor to indicate the amount by which the light is allowed to wrap
|
|
| scatterTexture:Texture2DBase (default = null ) — A texture that contains the light colour based on the angle. This can be used to change the light colour due to subsurface scattering when dot < 0
|
override arcane function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):void
Parameters
override arcane function cleanCompilationData():void
override arcane function getFragmentCodePerLight(vo:MethodVO, lightDirReg:ShaderRegisterElement, lightColReg:ShaderRegisterElement, regCache:ShaderRegisterCache):String
Parameters
Returnsoverride arcane function getFragmentPreLightingCode(vo:MethodVO, regCache:ShaderRegisterCache):String
Parameters
Returnsoverride arcane function initConstants(vo:MethodVO):void
Parameters
Thu Nov 15 2012, 12:08 PM Z