mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 06:04:03 +00:00
wg_engine: fix custom scene blending with opacity
fixed incorrect opacity applience for scene blending
This commit is contained in:
parent
ba7091956c
commit
2bd8fdad36
1 changed files with 1 additions and 3 deletions
|
@ -435,13 +435,11 @@ fn getFragData(id: vec2u) -> FragData {
|
||||||
data.Dc = colorDst.rgb;
|
data.Dc = colorDst.rgb;
|
||||||
data.Da = colorDst.a;
|
data.Da = colorDst.a;
|
||||||
data.skip = false;
|
data.skip = false;
|
||||||
data.Sc = data.Sc * So;
|
|
||||||
data.Sa = data.Sa * So;
|
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
fn postProcess(d: FragData, R: vec4f) -> vec4f {
|
fn postProcess(d: FragData, R: vec4f) -> vec4f {
|
||||||
return mix(vec4(d.Dc, d.Da), R, d.Sa);
|
return mix(vec4(d.Dc, d.Da), R, d.Sa * So);
|
||||||
};
|
};
|
||||||
)";
|
)";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue