Hey evvvverybody!

After our dear @motzi posted a comment about Mixbox on the offtopic chat, I noticed there was a nuget for it and decided to give it a go.

Mixbox is a library attempting to treat colors as pigments in the digital world, so if you lerp between blue and yellow, you get green as you would with real paint!

Since the library is quite small, it was all over rather quickly, which is a bit of a shame.

Nevertheless here it is!

VL.Mixbox.zip (14.3 KB)

A first draft that already exposes Lerp and Mix (basically all there is to it) with a simple help patch exploring each node, it may become a nuget at some point but for now, test and report.

Hope you find it useful :)

IMPORTANT NOTE: The website states that you should get a commercial license if you intend to use this commercially, so please make sure you do that.


Wow that was quick :)

Some more info


the shader version works too but unfortunately not without making changes to their file: Renaming to sdsl, adding a shader definition and some inputs. Just referencing it via #include doesn’t work.

For now I also only got it working as a TextureFX. The ShaderFX version somehow doesn’t create pins for “base class inputs”.

The result seems to be identical to the C# version. The texture IOBox is a bit off though.

Because of the license I am a bit hesitant to post the modified file here but if anyone needs it just ping me.

I also had a look at the spectral GLSL version but I am not sure about the colorspace conversions it does. And the values of the CMF are pre-multiplied for performance reasons with sRGB in mind according to the author.
I think this needs some color expert like @motzi :)


would it make sense to combine Mixbox with vl. unicolor?

Imho it doesn’t because of the different license terms of the libraries.

But maybe Kubelka-Munk based mixing makes it into Unicolor:

1 Like

yes, it would make sense to have in unicolor, like in your proposal.
Then I would need to remember how to update nugets, but they should be the smallest problem.

I made an attempt at porting the Spectral GLSL shader to SDSL.
The results are similar to mixbox.

VL.Mixbox_vs_SpectralJS.7z (16.4 KB)

Should I add this to VL.Addons/TexureFX?


@sunep I would wait and see if the people from Unicolor bring it in, from the back and forth between them and bjorn things are looking good :)

@bjoern nice one man! I mean if you don’t think there are any copyright considerations to be had, I’d say go for it.


Added the Spectral shader to VL.Addons ( >= 0.2.5 ). There is a Lerp (Spectral) ShaderFX and Gradient [Stride.TextureFX.Source] now comes with a Spectral option. Check the Spectral Mixing help patch.