Capítulo 130 de 859

Chapter 130: PhongLightingModel

Core Idea

Represents the lighting model for a phong material. Used in MeshPhongNodeMaterial.

Key Concepts

  • specular : boolean: Whether specular is supported or not. Set this to false if you are looking for a Lambert-like material meaning a material for non-shiny s…

Reference Tables

Constructor

Signature
new PhongLightingModel( specular : boolean )

Properties

PropertyDescription
.specular : booleanWhether specular is supported or not. Set this to false if you are looking for a Lambert-like material meaning a material for non-shiny surfaces, without specular highlights.

Methods

MethodDescription
.direct( lightData : Object )Implements the direct lighting. The specular portion is optional an can be controlled with the PhongLightingModel#specular flag.
.indirect( builder : NodeBuilder )Implements the indirect lighting.

Key Takeaways

  1. PhongLightingModel extends: LightingModel → BasicLightingModel
  2. Most relevant properties: specular.
  3. Key methods: direct, indirect.

Connects To