Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...

    Module rendering/materials/mesh-physical/refraction-apodization-tsl

    TSL twin of ./refraction-apodization.ts — the refraction-shift edge apodization on WebGPU.

    Three's TSL refraction (getIBLVolumeRefraction in PhysicalLightingModel) is module-private, so the shift is shaped through its inputs, exactly as the GLSL twin does: thickness and attenuationDistance — the property nodes three's setupVariants has just assigned — are rescaled by the ray scale λ, computed from the same n, v and position three's start() passes (normalWorld, the camera direction, positionWorld). The math, the knee and the floor are the reference module's; see it for the derivation.

    The NDC flip WebGPU applies to y does not matter here: the room is measured to the nearest border of each axis, which is symmetric in the sign.

    refractionRayScaleTSL
    applyRefractionApodizationTSL