Revert "Use pre-multiplied alpha for path rasterization"

This reverts commit 8eea9aad40.
This commit is contained in:
Junkui Zhang 2025-07-29 13:07:00 +08:00
parent 8eea9aad40
commit ce67ce1482
2 changed files with 2 additions and 3 deletions

View file

@ -1377,7 +1377,7 @@ fn create_blend_state(device: &ID3D11Device) -> Result<ID3D11BlendState> {
desc.RenderTarget[0].BlendEnable = true.into();
desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
desc.RenderTarget[0].SrcBlend = D3D11_BLEND_ONE;
desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_ONE;
desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ONE;

View file

@ -957,8 +957,7 @@ float4 paths_fragment(PathFragmentInput input): SV_Target {
float4 color = gradient_color(background, input.position.xy, input.bounds,
input.solid_color, input.color0, input.color1);
// Return premultiplied alpha for correct blending
return float4(color.rgb * color.a, color.a);
return color;
}
// --- path sprite --- //