New Asset iteration

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2021-07-01 22:56:24 +02:00
parent 2cfcb0b4a9
commit b4e263e1c2
278 changed files with 532 additions and 16127 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifndef EV_GLSL_SRGB_OPS_H
#define EV_GLSL_SRGB_OPS_H
vec4 LinearToSRGB(vec4 linearRGB)
{
bvec4 cutoff = lessThan(linearRGB, vec4(0.0031308));
vec4 higher = vec4(1.055)*pow(linearRGB, vec4(1.0/2.4)) - vec4(0.055);
vec4 lower = linearRGB * vec4(12.92);
return mix(higher, lower, cutoff);
}
vec4 SRGBToLinear(vec4 sRGB)
{
bvec4 cutoff = lessThan(sRGB, vec4(0.04045));
vec4 higher = pow((sRGB + vec4(0.055))/vec4(1.055), vec4(2.4));
vec4 lower = sRGB/vec4(12.92);
return mix(higher, lower, cutoff);
}
#endif