Model loading · function

sampleImpostor

Sample the impostor as the shader would: bilinear inside a tile, bilinear across the four tiles around the requested direction.

Explained in Importing models.

function sampleImpostor(impostor: Impostor, dir: ArrayLike<number>, u: number, v: number, out: Float32Array): void
import { sampleImpostor } from '@driftengine/assets';

Parameters

ParameterTypeDescription
impostorImpostor
dirArrayLike<number>
unumber
vnumber
outFloat32Array

In depth

No parallax correction, which is the whole of the error between baked directions and is stated here rather than discovered: blending four flat pictures of a shape with depth ghosts it. The remedy is more directions, and it costs their square.