Packageaway3d.materials
Classpublic class FresnelPBMaterial
InheritanceFresnelPBMaterial Inheritance away3d.materials.SinglePassShaderMaterial

BitmapData material which creates reflections based on a cube map. The reflection strength changes based on the refraction of the material and its environment, as well as the angle of view. This can be used to create water-like reflections.

Public Properties
 PropertyDefined by
  envMapAlpha : Number
The opacity of the environment map, ie: how reflective the surface is.
FresnelPBMaterial
  refractionStrength : Number
The maximum amount of refraction to be performed on the diffuse texture, used to simulate water
FresnelPBMaterial
Public Methods
 MethodDefined by
  
FresnelPBMaterial
(bitmap:BitmapData, normalMap:BitmapData, envMap:BitmapData, targetModel:Mesh, init:Object = null)
Creates a new FresnelPBMaterial object.
FresnelPBMaterial
Protected Methods
 MethodDefined by
  
updatePixelShader(source:Object3D, view:View3D):void
FresnelPBMaterial
Property detail
envMapAlphaproperty
envMapAlpha:Number  [read-write]

The opacity of the environment map, ie: how reflective the surface is. 1 is a perfect mirror.

Implementation
    public function get envMapAlpha():Number
    public function set envMapAlpha(value:Number):void
refractionStrengthproperty 
refractionStrength:Number  [read-write]

The maximum amount of refraction to be performed on the diffuse texture, used to simulate water

Implementation
    public function get refractionStrength():Number
    public function set refractionStrength(value:Number):void
Constructor detail
FresnelPBMaterial()constructor
public function FresnelPBMaterial(bitmap:BitmapData, normalMap:BitmapData, envMap:BitmapData, targetModel:Mesh, init:Object = null)Parameters
bitmap:BitmapData — The texture to be used for the diffuse shading
 
normalMap:BitmapData — An object-space normal map
 
envMap:BitmapData — The spherical environment map used for reflections
 
targetModel:Mesh — The target mesh for which this shader is applied
 
init:Object (default = null) — An initialisation object
Init Parameters
 envMapAlpha:Number (default = 1)
 outerRefraction:Number (default = 1.0008)
 innerRefraction:Number (default = 1.330)
 refractionStrength:Number (default = 1)
Method detail
updatePixelShader()method
protected override function updatePixelShader(source:Object3D, view:View3D):void Parameters
source:Object3D
 
view:View3D
Wiki link
Click to go to the wiki page for 'away3d.materials.FresnelPBMaterial'

Code examples

Comments