wg_engine: fix custom scene blending with opacity

fixed incorrect opacity applience for scene blending
This commit is contained in:
Sergii Liebodkin 2024-10-02 13:36:50 +00:00 committed by Hermet Park
parent ba7091956c
commit 2bd8fdad36

View file

@ -435,13 +435,11 @@ fn getFragData(id: vec2u) -> FragData {
data.Dc = colorDst.rgb;
data.Da = colorDst.a;
data.skip = false;
data.Sc = data.Sc * So;
data.Sa = data.Sa * So;
return data;
};
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);
};
)";