Fix from richcole
Added spline, gain, gamma & bias
Support for buffer-backed textures
forgot to commit one file
misc bits