Interface: NTCProfile
Named compression-profile presets, bundling the grid/MLP shape knobs
(NTCGridModel.js's GRID_LEVELS_OPTIONS/GRID_BASE_RESOLUTION_OPTIONS/
MLP_HIDDEN_SIZE_OPTIONS/MLP_ACTIVATION_OPTIONS) that would otherwise
have to be hand-tuned as 4 independent options, loosely modeled on the
NVIDIA neural texture compression paper's own named profiles (Table 2:
NTC 0.2/0.5/1.0/2.25 bits-per-pixel-per-channel), but chosen here for
decode-cost/compatibility tiers rather than a fixed bpp target - actual
storage size and quality both still depend on the source material's
resolution and channel count (see NTCModelSize.js's
computeModelFootprint for the exact byte accounting).
mobile-fast mirrors the mobile-oriented defaults sketched in this repo's
EXT_neural_textures.md draft (2 hidden layers, width 16) - it trades
reconstruction quality for the smallest decoder (fewest weights, fewest
ALU ops per shaded pixel, smallest fp32-uniform footprint and is the
safest default for unknown/low-end mobile hardware.
mobile-balanced is this addon's own long-standing default shape (2
hidden layers of width 32, relu) - already a reasonable middle ground
that plenty of mobile GPUs handle comfortably, just given a name here
rather than being an implicit, undocumented default.
desktop-quality is the closest match in this codebase to the NVIDIA
paper's own default decoder (Section 4.4: 2 hidden layers of width 64,
hardGELU) - the highest reconstruction quality of the three, at the
highest per-pixel decode cost (4x the hidden-layer weights of
mobile-balanced, plus hardGELU's extra ALU ops per neuron over relu's
single max() - see NTCMLPTSL.js's evaluateLinearLayerMat4). Best suited to
desktop-class GPUs or contexts where decode cost is not the bottleneck.
Every profile only sets levels/baseResolution/hiddenSizes/
hiddenActivation - channels, outputChannels, mipsPerLevel,
quantization, batch/iteration/learning-rate settings, etc. are left to
the caller (NTCTrainer.js's own defaults, or the source material's actual
channel layout) exactly as they would be without a profile applied.
Properties
baseResolution
baseResolution:
number
description
description:
string
hiddenActivation
hiddenActivation:
string
hiddenSizes
hiddenSizes:
number[]
label
label:
string
levels
levels:
number