Skip to content

Commit ca9ec37

Browse files
authored
Merge pull request #635 from andyleiserson/dual-source-blending
Enable dual-source blending (requires unreleased wgpu changes)
2 parents 7f0012d + ed5bbb9 commit ca9ec37

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

crates/kas-wgpu/src/draw/images.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,9 @@ impl Images {
171171
);
172172

173173
let mut atlas_rgba_mask = None;
174-
// FIXME: This is disabled because of a wgpu validation error
175-
#[allow(clippy::overly_complex_bool_expr)]
176-
if false
177-
&& device
178-
.features()
179-
.contains(wgpu::Features::DUAL_SOURCE_BLENDING)
174+
if device
175+
.features()
176+
.contains(wgpu::Features::DUAL_SOURCE_BLENDING)
180177
{
181178
atlas_rgba_mask = Some(atlases::Pipeline::new(
182179
device,

crates/kas-wgpu/src/draw/shaders/subpixel.frag

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ precision mediump float;
1111
layout(location = 0) in vec2 tex_coord;
1212
layout(location = 1) in vec4 col;
1313

14-
layout(location = 0) out vec4 frag_color;
15-
layout(location = 1) out vec4 blend_color;
14+
layout(location = 0, index = 0) out vec4 frag_color;
15+
layout(location = 0, index = 1) out vec4 blend_color;
1616

1717
layout(set = 1, binding = 0) uniform texture2D tex;
1818
layout(set = 1, binding = 1) uniform sampler tex_sampler;
32 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)