Renderer · interface

ReflectiveSample

A reflective surface, as a shading path holds one.

Explained in Hello world.

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

Properties

NameTypeDescription
pointreadonlyReadonlyVec3
normalreadonlyReadonlyVec3
viewreadonlyReadonlyVec3Which way the eye is looking, toward the surface. Need not be unit length.
roughnessreadonlynumber0 is a mirror, 1 is fully diffuse. See reflectionCone.