SubsurfaceScatteringDiffuseMethod provides a depth map-based diffuse shading method that mimics the scattering of
light inside translucent surfaces. It allows light to shine through an object and to soften the diffuse shading.
It can be used for candle wax, ice, skin, ...
scatterColor:uint
[read-write]
The colour the light becomes inside the object.
Implementation
public function get scatterColor():uint
public function set scatterColor(value:uint):void
scattering:Number
[read-write]
The amount by which the light scatters. It can be used to set the translucent surface's thickness. Use low
values for skin.
Implementation
public function get scattering():Number
public function set scattering(value:Number):void
translucency:Number
[read-write]
The translucency of the object.
Implementation
public function get translucency():Number
public function set translucency(value:Number):void
public function SubsurfaceScatteringDiffuseMethod(depthMapSize:int = 512, depthMapOffset:Number = 15)
Parameters
| depthMapSize:int (default = 512 ) — The size of the depth map used.
|
|
| depthMapOffset:Number (default = 15 ) — The amount by which the rendered object will be inflated, to prevent depth map rounding errors.
|
Init Parameters
arcane override function activate(context:Context3D, contextIndex:uint):void
Sets the render state for this method.
Parameters
| context:Context3D — The Context3D currently used for rendering.
|
|
| contextIndex:uint |
arcane override function deactivate(context:Context3D):void
Parameters
arcane override function getFragmentAGALPreLightingCode(regCache:ShaderRegisterCache):String
Get the fragment shader code that will be needed before any per-light code is added.
Parameters
Returns
arcane override function getFragmentCodePerLight(lightIndex:int, lightDirReg:ShaderRegisterElement, lightColReg:ShaderRegisterElement, regCache:ShaderRegisterCache):String
Get the fragment shader code that will generate the code relevant to a single light.
Parameters
Returns
arcane override function getFragmentPostLightingCode(regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String
Get the fragment shader code that should be added after all per-light code. Usually composits everything to the target register.
Parameters
Returns
arcane override function getVertexCode(regCache:ShaderRegisterCache):String
Get the vertex shader code for this method.
Parameters
Returns
arcane override function reset():void
arcane override function setRenderState(renderable:IRenderable, context:Context3D, contextIndex:uint, camera:Camera3D, lights:Vector):void
Parameters