mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +00:00
wg_engine: fixed scene blending equation and clear color rule
Issue: https://github.com/thorvg/thorvg/issues/2998
This commit is contained in:
parent
8f13920b7a
commit
07fbe56162
2 changed files with 2 additions and 2 deletions
|
@ -397,7 +397,7 @@ bool WgRenderer::beginComposite(RenderCompositor* cmp, MaskMethod method, uint8_
|
|||
mRenderStorageStack.push(storage);
|
||||
// begin newly added render pass
|
||||
WGPUColor color{};
|
||||
if ((method == MaskMethod::None) && (opacity != 255)) color = { 1.0, 1.0, 1.0, 0.0 };
|
||||
if ((compose->method == MaskMethod::None) && (compose->blend != BlendMethod::Normal)) color = { 1.0, 1.0, 1.0, 0.0 };
|
||||
mCompositor.beginRenderPass(mCommandEncoder, mRenderStorageStack.last(), true, color);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -237,7 +237,7 @@ fn vs_main(in: VertexInput) -> VertexOutput {
|
|||
@fragment
|
||||
fn fs_main(in: VertexOutput) -> @location(0) vec4f {
|
||||
let Sc = textureSample(uTextureSrc, uSamplerSrc, in.vTexCoord.xy);
|
||||
return vec4f(Sc.rgb * Sc.a * So, Sc.a * So);
|
||||
return vec4f(Sc.rgb * So, Sc.a * So);
|
||||
};
|
||||
)";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue