Skip to content

Instantly share code, notes, and snippets.

RMSE PSNR Time
Kodak/Waterloo Image Set:
stb 8.202766 29.851597 0.258041
stb-hq 8.009301 30.058910 0.284019
nvtt-fast 8.089954 29.971882 0.445670
nvtt 7.616215 30.496019 6.806233
nvtt-hq 7.562366 30.557650 13.081200
@castano
castano / BSpline.cpp
Created June 15, 2012 19:13
Old b-spline interpolation and approximation code
/*===========================================================================
Title: BSpline.cpp
Module: Pi/MathLib
Author: Ignacio Castaño
Date: 29/05/2000
License: Public Domain
===========================================================================*/
/*----------------------------------------------------------------------------
Doc:
@castano
castano / gist:b05863af48138dab368b23a0ab86e735
Created March 30, 2017 22:54
Least Squares Vertex Quantization
I didn't think there was much to gain from optimizing quantization intervals for vertex compression, but I thought it would give it a try and see it for myself.
I have a set of vertices X that I want to quantize. The trivial way to do that is to transform them to the [0,1] range and store them using an integer UNORM format.
At runtime the vertices are reconstructed as follows:
X = Q * m + a
Where: