Documentation / Node reference / code nodes
code/LightingModelPBR
Shades a physically based surface with the scene lights.
Lights
Outputs the colour of a surface lit by the scene's lights, set by how metallic and how rough it is.
Parameters
| Name | Type | What it does |
|---|---|---|
| albedo | Color | Surface colour. |
| metallic | Float | 0 for a non-metal, 1 for a metal. |
| roughness | Float | 0 for a mirror, 1 for fully matte. |
| ao | Float | How much ambient light reaches the surface, 0 to 1. |
| 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.