1
0
Fork 0
forked from wry/wry

vulkan: add support for blend buffers

This commit is contained in:
Julian Orth 2025-02-22 17:18:20 +01:00
parent 1220539a41
commit cb9da22ec2
20 changed files with 638 additions and 78 deletions

View file

@ -0,0 +1,21 @@
#ifndef TRANSFER_FUNCTIONS_GLSL
#define TRANSFER_FUNCTIONS_GLSL
vec3 eotf_srgb(vec3 c) {
return mix(
c * vec3(1.0 / 12.92),
pow((c + vec3(0.055)) / vec3(1.055), vec3(2.4)),
greaterThan(c, vec3(0.04045))
);
}
vec3 oetf_srgb(vec3 c) {
c = clamp(c, 0.0, 1.0);
return mix(
c * vec3(12.92),
vec3(1.055) * pow(c, vec3(1/2.4)) - vec3(0.055),
greaterThan(c, vec3(0.0031308))
);
}
#endif