API

Interface RefractionProps

Refraction sub-feature (KHR_materials_transmission + _volume + _ior). Presence enables frame-graph scene-texture transmission.

interface RefractionProps {
    dispersion?: number;
    indexOfRefraction?: number;
    intensity?: number;
    texture?: Texture2D;
    useThicknessAsDepth?: boolean;
}
Index
dispersion?: number

Chromatic dispersion strength (KHR_materials_dispersion.dispersion). Splits the refracted ray into per-RGB index-of-refraction offsets, producing chromatic aberration. Requires volume. Default 0 (off).

indexOfRefraction?: number

Index of refraction (KHR_materials_ior.ior). Default 1.5 (glass).

intensity?: number

Transmission factor (0=off, 1=fully transmissive). Default 0. Maps to KHR_materials_transmission.transmissionFactor.

texture?: Texture2D

Optional transmission texture (R channel). Multiplies intensity.

useThicknessAsDepth?: boolean

When true, the thickness value is also used as the refracted sample offset depth (KHR_materials_volume — matches BJS useThicknessAsDepth). Default true when volume is present.