Skip to content

Commit 5c29302

Browse files
committed
Reproduce issue
1 parent 7798534 commit 5c29302

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

wgpu/examples/msaa-line/shader.wgsl

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
struct VertexOutput {
22
[[location(0)]] color: vec4<f32>;
3+
[[location(1), interpolate(flat)]] a: u32;
34
[[builtin(position)]] position: vec4<f32>;
45
};
56

@@ -11,10 +12,16 @@ fn vs_main(
1112
var out: VertexOutput;
1213
out.position = vec4<f32>(position, 0.0, 1.0);
1314
out.color = color;
15+
out.a = 5u32;
1416
return out;
1517
}
1618

1719
[[stage(fragment)]]
1820
fn fs_main(in: VertexOutput) -> [[location(0)]] vec4<f32> {
19-
return in.color;
21+
if (in.a == 0u32) {
22+
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
23+
}
24+
else {
25+
return vec4<f32>(0.0, 0.0, 1.0, 1.0);
26+
}
2027
}

0 commit comments

Comments
 (0)