With just one round, this hash is better than the previous one with
two rounds. And at 2-3 rounds it seems to be just as good quality
as a slow, per-bit hashing approach, which I've been using as
ground-truth for testing.
This allows perfect representation of E (equal energy spectrum).
It's not important from a perceptual standpoint, but it provides
a simple way for Psychopath to represent E when needed for other
purposes.
This is useful because it's super fast, and chromaticity lookups
are typical for spectral upsampling anyway, so this will likely
enable cutting out a bunch of unecessary intermediate calculations.
The whole point of these formats is to compress down to less
space, so let's not leave actually putting it in the space-saving
form on the client code.
It is identical to the 32-bit format, except with more precision
and range due to using more bits. This format should comfortably
store any color information with precision easily exceeding the
limits of human vision.
This also makes encoding faster. However, it no longer does
rounding to the nearest precision when encoding, and insead does
flooring. This seems like a reasonable tradeoff: if you want more
precision... you should use a format with more precision.
It was a worthwhile experiment, but for it to really work it needs
a really proper luma-chroma separation, which is both slower than
I really want, and requires knowing the colorspace being used.
I might make another go at this based on the TIFF LogLUV color
format, requiring XYZ as input.
After thinking about this and after some discussion with other
people, I now believe that hierarchical instancing isn't actually
that useful in practice for rendering.
Single-level instancing is still supported, of course.