Documentation / Node reference / code nodes

code/LightingModelPhong

Shades a shiny surface with the scene lights.

Lights

Outputs the colour of a surface lit by the scene's lights: a matte part plus a highlight. emissive is added on top.

Parameters

Name Type What it does
color Color Surface colour.
specular Color Colour of the highlight.
shininess Float Higher gives a smaller, sharper highlight.
emissive Color Light the surface gives off, added on top.
worldPos Vector3 Position to shade. Unwired, the point being shaded.
normal Vector3 Surface normal. Unwired, the shaded point's normal.
viewDir Vector3 Direction toward the viewer. Unwired, from the camera.

This page is generated from the engine, so it describes the release you can download. The same text is in the editor's Help panel next to the node itself.