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): voidimport { sampleImpostor } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
impostor | Impostor | |
dir | ArrayLike<number> | |
u | number | |
v | number | |
out | Float32Array |
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.