Renderer · interface

GpuDrivenTextures

The forward path's maps, as decode programs. SurfaceMaterial binds an albedo, a normal and an occlusion-roughness-metallic image, and its scales and strengths mean what they mean there — the ORM map replaces roughness and the scale gives the scaling back, and occlusion strength is a mix from one rather than a multiply. Defaults are SurfaceMaterial's.

Explained in Hello world.

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

Properties

NameTypeDescription
baseColourreadonlyoptionalGpuDrivenProgram
normalreadonlyoptionalGpuDrivenProgram
ormreadonlyoptionalGpuDrivenProgramOcclusion in R, roughness in G, metallic in B — glTF's packing, as SurfaceMaterial.orm.
emissivereadonlyoptionalGpuDrivenProgramWhere the surface glows, in colour, as SurfaceMaterial.emissive's map: the glow is the albedo times this times the material's emissive, so a black texel glows nowhere and the scalar still says how brightly the rest does. glTF's rule and flat/main.ts's, which the facade of a city at dusk needed — lit windows in a wall that does not glow — and the pipeline could not say until 2026-09-18.
uScalereadonlyoptionalnumber
vScalereadonlyoptionalnumber
normalStrengthreadonlyoptionalnumberDefaults to 1 when a normal program is given and 0 when it is not.
roughnessScalereadonlyoptionalnumber
metallicScalereadonlyoptionalnumber
occlusionStrengthreadonlyoptionalnumber