Model loading · function
rasteriseView
An orthographic rasterisation of a mesh from one direction, as resolution² RGBA texels.
Explained in Importing models.
function rasteriseView(mesh: MeshData, frame: ViewFrame, dir: ArrayLike<number>, resolution: number, out: Float32Array): voidimport { rasteriseView } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
mesh | MeshData | |
frame | ViewFrame | |
dir | ArrayLike<number> | |
resolution | number | |
out | Float32Array |
In depth
dir points from the object toward the viewer. Alpha is 1 where a triangle covers the texel
centre and 0 where none does — coverage rather than an anti-aliased edge, because what this
feeds is a silhouette comparison and an atlas whose edge ramp comes from its own filtering.
Exported because the claim a proxy has to meet is about its silhouette, and a test that cannot rasterise cannot check one.