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.
TSL twin of
./refraction-apodization.ts— the refraction-shift edge apodization on WebGPU.Three's TSL refraction (
getIBLVolumeRefractioninPhysicalLightingModel) is module-private, so the shift is shaped through its inputs, exactly as the GLSL twin does:thicknessandattenuationDistance— the property nodes three'ssetupVariantshas just assigned — are rescaled by the ray scaleλ, computed from the samen,vand position three'sstart()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
ydoes not matter here: the room is measured to the nearest border of each axis, which is symmetric in the sign.