Profile PictureEvenZHAng
$0+

Oklab Color Space Interpolation In Unreal Engine

3 ratings
Add to cart

Oklab Color Space Interpolation In Unreal Engine

$0+
3 ratings

I made an HLSL version of Oklab color space interpolation to used in UE material nodes. I pack the code in a Material Function for convenient usage.

You can donwload either a UE4.27 version or a UE5 version for free.


What is Oklab color space

https://bottosson.github.io/posts/oklab/

Oklab can create smooth and uniform looking transitions between colors.

As shown in the first cover image, in normal RGB space, interpolation from blue to orange will cause pinkish transition. But in Oklab space, there is no pinkish color, it's much more natural and smoother.


How to use?

Put the three assets files in unreal project's Content folder. The file path should be like:

Content / OKLabColorSpace / MF_OkLabMix.uasset

Content / OKLabColorSpace / M_OKLab.uasset

Content / OKLabColorSpace / L_Demo.umap


The MF_OKLabMix is the material function file. The other two are just for demonstration.


Use this material function just like a normal lerp node.


Reference

The HLSL codes is converted from GLSL code which made on shadertoy by iq. The GLSL code is from shadertoy by iq.

$
Add to cart
Copy product URL

Ratings

4.3
(3 ratings)
5 stars
67%
4 stars
0%
3 stars
33%
2 stars
0%
1 star
0%