Vixen
02b45cc4
csharp
public sealed class CubeLutImporter

Turns a colourist's .cube into the 3D texture the tonemapper samples.

Read the guide page for this →

As a importer

Extensions
.cube

Remarks

The missing half of a grading pipeline that was otherwise complete. Tonemap.rvn has sampled a Texture3D with the correct half-texel inset since it was written, and no project could author one — the importer list was models, textures, audio, video, scenes, navmeshes and palettes. A host had to build the texture in C# by hand, so nobody did.

⚠ No mip chain. Every other texture importer builds one and this must not: a lookup table is sampled at exactly one level, and a half-size mip of a colour transform is a different colour transform — averaging two entries of a grade is not the grade halfway between them. A sampler that fell to a lower level would silently apply it.

⚠ No compression either. Block compression works because neighbouring texels in a picture are similar and the eye forgives the error. Neither is true here: neighbouring entries are a gradient the grade exists to control, and the error lands on every pixel of the frame that indexes through it.

Fields and properties (1)

  • public override int Version

    Its own version. Bumping it invalidates every artefact it has ever produced, which is the whole mechanism for "I fixed the mip filter, re-import everything".

Methods (1)