Change summary
crates/gpui/src/platform/windows/directx_renderer.rs | 2 +-
crates/gpui/src/platform/windows/shaders.hlsl | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
Detailed changes
@@ -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;
@@ -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 --- //