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,8 +10,11 @@ layout(location = 0) out vec4 out_color;
|
|||
|
||||
void main() {
|
||||
vec4 c = texelFetch(in_color, ivec2(gl_FragCoord.xy), 0);
|
||||
c.rgb /= mix(c.a, 1.0, c.a == 0.0);
|
||||
c.rgb = oetf_srgb(c.rgb);
|
||||
c.rgb *= c.a;
|
||||
if (eotf != oetf) {
|
||||
c.rgb /= mix(c.a, 1.0, c.a == 0.0);
|
||||
c.rgb = apply_eotf(c.rgb);
|
||||
c.rgb = apply_oetf(c.rgb);
|
||||
c.rgb *= c.a;
|
||||
}
|
||||
out_color = c;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue