vulkan: rewrite shaders in terms of eotf and oetf
This commit is contained in:
parent
cb9dc4c182
commit
b7f93b37a6
8 changed files with 52 additions and 14 deletions
|
|
@ -10,11 +10,12 @@ layout(location = 0) out vec4 out_color;
|
|||
|
||||
void main() {
|
||||
vec4 c = textureLod(tex, tex_pos, 0);
|
||||
if (color_management) {
|
||||
if (eotf != oetf) {
|
||||
if (src_has_alpha) {
|
||||
c.rgb /= mix(c.a, 1.0, c.a == 0.0);
|
||||
}
|
||||
c.rgb = eotf_srgb(c.rgb);
|
||||
c.rgb = apply_eotf(c.rgb);
|
||||
c.rgb = apply_oetf(c.rgb);
|
||||
if (src_has_alpha) {
|
||||
c.rgb *= c.a;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue