okLAB in VDMX (Shaders Inside!)

Heyo everyone!

I’m posting this to share my open source ISF and Metal shaders that make working in the okLAB colorspace easy in VDMX.

This includes:

  • ISF “filter” shaders to convert to/from the RGB colorspace and okLAB.
  • Metal shaders to place into the blending mode content folder that include a combination of operations on the L, A and B channels.

The Shaders:

https://github.com/doawoo/vdmx-oklab-isf

What is okLAB?

okLAB is a “perceptual” colorspace. Similar to LAB, it abstracts the concept of color “value” into a single channel and hue information into the other two. The difference with okLAB is that it ensures consistent value of a hue as you move across the space.

It’s a bit abstract to explain but you can observe the consistency in the gradients below, okLAB on the top vs HSV on the bottom:

Source: Mini: OkLab - by Xor - GM Shaders (this is a nice article on the issue!)

Anyways, hope these are useful to you, they’re totally free to use! :3

2 Likes