On GitHub here:
Richard Geldreich's Blog
Co-owner of Binomial LLC, working on GPU texture interchange. Open source developer, Open Geospatial Consortium member, graphics programmer, former video game developer. Worked previously at SpaceX (Starlink), Valve, Ensemble Studios (Microsoft), DICE Canada.
Wednesday, October 28, 2026
Tuesday, October 27, 2026
Neural JPEG artifact reduction in C++
Designed to be trivial to drop into any program, it filters an already decoded 32bpp RGBA JPEG image. A little helper is provided to extract the DCT quality factor, which is also fed into the MLP:
https://github.com/richgel999/jpegc_deblockThe model's ~2.2k weights are in a single header. It was trained on an RTX 5090, using libjpeg with a custom training engine.
"A 7x7-window MLP (52 inputs: the luma window as differences from the centre, the centre's luma, the 8x8 block phase, the quality factor; hidden 32 and 16, leaky ReLU; one linear output) that predicts a luma correction added to R, G and B, equivalent to a Y-only correction in YCbCr. Trained by finite differences on 514 PNGs round-tripped through baseline JPEG at qualities 30..95. On held-out images it gains about +0.95 dB luma PSNR at quality 30, +0.9 at 40, +0.7 at 80. About 20 Mpx/s on 32 threads, 1.6 Mpx/s on one."
Saturday, October 24, 2026
Saturday, September 19, 2026
NNTC PBR material set compressor: now supports CPU encoding
Friday, September 18, 2026
Latent-based GPU texture public Prior Art from 2012
Experiments in Luma-Optimized and Mipmapped DXT1 Compression:
The sample app's archive (with shader source code) is still available here.
Major concepts:
- It splits information by spatial frequency: full-resolution luma/detail plus lower-resolution chroma/color state. The page puts luma in mip 0 and the color/chroma image at half resolution and below.
- It reconstructs the final texel in the pixel shader from separately hardware-filtered components. The page explicitly says bilinear/trilinear/anisotropic filtering works normally because the reconstruction is linear.
- It deliberately makes the encoder aware of the runtime reconstruction. There is even an optional feedback pass that modifies the high-resolution luma to compensate for errors introduced by the compressed, upsampled low-resolution chroma.
- It treats the lower-resolution representation as something that gets interpolated by ordinary texture hardware and then combined with the high-resolution signal—not decompressed into a conventional texture first.
- It even says a preferable version would use DXT5A/BC4 for the high-resolution scalar field instead of abusing DXT1 for luma.
Tuesday, September 15, 2026
NNTC viewing example which uses VK_NV_cooperative_vector
Sunday, September 13, 2026
Notes on NNTC vs. neural texturing
NNTC (here on GitHub) uses a bilinear/degree-2 polynomial decoder fitted to each PBR material (i.e. a degree-2 polynomial whose only quadratic terms are the products between the two latents). Other solutions use full non-linear neural networks (MLP's).
In my testing, MLP's are usually but not always stronger, but not by much (low PSNR difference, like ~1-3 dB). MLP's also make it harder to get filtered samples - NNTC easily leverages existing GPU texture filtering hardware.
However, eventually as I optimized the NNTC-specific CUDA encoder, and made it BC4/BC5 aware, it started to beat my neural network based solution on raw PSNR.Training MLP's is a lot more expensive, and a harder problem to solve - and IMHO unnecessary for PBR textures if you configure the latent textures correctly. Encoding high frequency details into low-res feature channels and training MLP's to decode them is going to be quite expensive. The alternative is to do what GPU texture formats like BC1-7/PVRTC1/ASTC/etc. have been using for ages: use high resolution weight planes, and optionally (for more efficient distribution) supercompress the data in some way using RDO+LZ, DCT etc.
NNTC also encodes in seconds with CUDA. Even with backprop, I'm skeptical a neural solution can be competitive there.