rendervulkan: Do rcas opacity in the correct colorspace if we calculate it anyway.
This commit is contained in:
parent
2d537df252
commit
ada1c7f89d
1 changed files with 7 additions and 3 deletions
|
@ -51,14 +51,18 @@ void rcasComposite(uvec2 pos)
|
||||||
if (all(lessThan(rcasPos, layer0Extent))) {
|
if (all(lessThan(rcasPos, layer0Extent))) {
|
||||||
FsrRcasF(outputValue.r, outputValue.g, outputValue.b, rcasPos, u_c1.xxxx);
|
FsrRcasF(outputValue.r, outputValue.g, outputValue.b, rcasPos, u_c1.xxxx);
|
||||||
|
|
||||||
// Technically the wrong color space but doing srgb -> linear -> srgb just for
|
if (c_layerCount == 1) {
|
||||||
// scaling is silly. This is good enough.
|
// Technically the wrong color space if you just have one layer.
|
||||||
|
// but doing srgb -> linear -> srgb just for scaling is silly. This is good enough.
|
||||||
outputValue *= u_opacity[0];
|
outputValue *= u_opacity[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (c_layerCount > 1) {
|
if (c_layerCount > 1) {
|
||||||
outputValue = srgbToLinear(outputValue);
|
outputValue = srgbToLinear(outputValue);
|
||||||
|
outputValue *= u_opacity[0];
|
||||||
vec2 uv = vec2(pos);
|
vec2 uv = vec2(pos);
|
||||||
|
|
||||||
for (int i = 1; i < c_layerCount; i++) {
|
for (int i = 1; i < c_layerCount; i++) {
|
||||||
|
|
Loading…
Reference in a new issue