Class: NTCTrainer
Browser-side trainer that fits a small mip-pyramid-of-feature-grids + MLP neural representation to a single static GPU texture (e.g. a material's albedo/base-color channel), following the NVIDIA neural texture compression recipe: a handful of trainable feature grids, each reused (via an explicit LOD input) to reconstruct several physical mip levels, feeding a shallow shared MLP decoder, trained with Adam + L2 loss.
Unlike NeuralAppearanceTrainer (which distills an entire BRDF's shading
response and therefore needs a rendered "teacher atlas" + CPU readback),
the teacher here is already a static GPU texture, so training samples are
generated and read entirely on the GPU inside the training compute
shader - no readback round trip is needed per iteration.
Constructors
Constructor
new NTCTrainer(
options?):NTCTrainer
Parameters
options?
NTCTrainerOptions = {}
Returns
NTCTrainer
Properties
options
options:
NTCTrainerOptions
quantizationRange
quantizationRange: [
number,number][] |null
random
random: () =>
number
Returns
number
Methods
abort()
abort():
void
Requests that an in-flight train() call finish after the current
iteration and return the current model, as if the run had completed.
Returns
void
train()
train(
__namedParameters):Promise<{cpuModel:NTCGridPyramidModel;iteration:number;iterations:number;loss:number;quantization:ResolvedNTCQuantizationConfig;quantizationRange: [number,number][] |null;stoppedEarly:boolean; }>
Parameters
__namedParameters
Returns
Promise<{ cpuModel: NTCGridPyramidModel; iteration: number; iterations: number; loss: number; quantization: ResolvedNTCQuantizationConfig; quantizationRange: [number, number][] | null; stoppedEarly: boolean; }>