Skip to main content

Function: createNTCGridPyramidModel()

createNTCGridPyramidModel(options, random): NTCGridPyramidModel

Creates the CPU-side reference model: a genuine mip pyramid of feature grids (resolutions/grids, finest-first - see computeGridLevels) plus a small MLP decoder.

At any given LOD, exactly one grid level's channels-wide feature vector (selected via NTCMipBands.selectFeatureLevel - not concatenated with any other level's) feeds the decoder, alongside the normalized LOD itself - which the decoder needs because a single stored level is reused to reconstruct several different physical mips (see NTCMipBands.js's doc comment). This is what makes the decoder's input a fixed channels + 1 wide regardless of how many mip levels the pyramid stores, and it mirrors the NVIDIA neural texture compression paper's own decoder input (Section 4.4: one feature level's taps plus a LOD value).

Parameters​

options​

NTCGridPyramidOptions

random​

() => number

Returns​

NTCGridPyramidModel