Skip to content

Instantly share code, notes, and snippets.

View ognis1205's full-sized avatar
🐈‍⬛

Shingo OKAWA ognis1205

🐈‍⬛
View GitHub Profile
@ognis1205
ognis1205 / LabColorspace.cginc
Created April 12, 2022 00:53 — forked from mattatz/LabColorspace.cginc
Conversion between RGB and LAB colorspace shader for Unity.
#ifndef __LAB_COLORSPACE__
#define __LAB_COLORSPACE__
/*
* Conversion between RGB and LAB colorspace.
* Import from flowabs glsl program : https://code.google.com/p/flowabs/source/browse/glsl/?r=f36cbdcf7790a28d90f09e2cf89ec9a64911f138
*/
float3 rgb2xyz( float3 c ) {
float3 tmp;