Packageaway3d.materials
Classpublic class PhongPBMaterial
InheritancePhongPBMaterial Inheritance away3d.materials.SinglePassShaderMaterial

Bitmap material with per-texel phong shading.

Public Properties
 PropertyDefined by
  gloss : Number
The gloss component of the specular highlight.
PhongPBMaterial
  specular : Number
The strength of the specular highlight
PhongPBMaterial
  specularMap : BitmapData
PhongPBMaterial
Public Methods
 MethodDefined by
  
PhongPBMaterial
(bitmap:BitmapData, normalMap:BitmapData, targetModel:Mesh, specularMap:BitmapData = null, init:Object = null)
Creates a new PhongPBMaterial object.
PhongPBMaterial
Protected Methods
 MethodDefined by
  
updatePixelShader(source:Object3D, view:View3D):void
Updates the pixel bender shader
PhongPBMaterial
Property detail
glossproperty
gloss:Number  [read-write]

The gloss component of the specular highlight. Higher numbers will result in a smaller and sharper highlight.

Implementation
    public function get gloss():Number
    public function set gloss(value:Number):void
specularproperty 
specular:Number  [read-write]

The strength of the specular highlight

Implementation
    public function get specular():Number
    public function set specular(value:Number):void
specularMapproperty 
specularMap:BitmapData  [read-write]Implementation
    public function get specularMap():BitmapData
    public function set specularMap(value:BitmapData):void
Constructor detail
PhongPBMaterial()constructor
public function PhongPBMaterial(bitmap:BitmapData, normalMap:BitmapData, targetModel:Mesh, specularMap:BitmapData = null, init:Object = null)Parameters
bitmap:BitmapData — The texture to be used for the diffuse shading
 
normalMap:BitmapData — An object-space normal map
 
targetModel:Mesh — The target mesh for which this shader is applied
 
specularMap:BitmapData (default = null) — An optional specular map BitmapData, which modulates the specular reflections
 
init:Object (default = null) — An initialisation object
Init Parameters
 gloss:Number (default = 10)
 specular:Number (default = 1)
Method detail
updatePixelShader()method
protected override function updatePixelShader(source:Object3D, view:View3D):void

Updates the pixel bender shader

Parameters
source:Object3D
 
view:View3D
Wiki link
Click to go to the wiki page for 'away3d.materials.PhongPBMaterial'

Code examples

Comments