Renderer · interface

SurfaceLayerLook

One layer's own look, applied to what it reads before the layers are blended. Every field is the identity where it is absent, so a material names only what differs.

Explained in Hello world.

interface SurfaceLayerLook
import type { SurfaceLayerLook } from '@driftengine/core';

Properties

NameTypeDescription
tintreadonlyoptionalVec3Multiplies the layer's colour, linear. Above 1 brightens it. Absent: [1, 1, 1].
roughnessreadonlyoptionalreadonly [number, number]The roughness the ORM's green channel is spread over, from its 0 to its 1. Absent: [0, 1].
metalnessreadonlyoptionalreadonly [number, number]The metalness the ORM's blue channel is spread over, the same way. Absent: [0, 1].
normalStrengthreadonlyoptionalnumberHow far the layer's normal map bends the surface: its tangent-space x and y times this, before the layers' normals are blended. 0 is flat, 1 the map as it is. Absent: 1.
specularreadonlyoptionalnumberThe layer's specular, in the units a mesh's vertices carry theirs: how strong a highlight is, and under physicalSpecular the reflectance head-on, 0.08 × specular. Blended across the layers as their colours are. Absent: the surface's own, as its vertices give it.