Last active
September 7, 2018 15:19
-
-
Save DarkMio/af22091ac9a28cf701fff1c219d6cad2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float4 hsv2rgb(float4 c) | |
{ | |
float4 K = float4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); | |
float3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www); | |
return float4(c.z * lerp(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment