wgpu
wgpu copied to clipboard
Lines are thicker than 1px on Windows Dx12
Description
When drawing lines using PrimitiveTopology::LineList
or PrimitiveTopology::LineStrip
, they are 1px thick on Vulkan
and Gl
, but on Dx12
they are thicker than 1px when MSAA sample count is greater than 1.
I suspect this has something to do with their rasterization rules:
Rasterization rules for primitives are, in general, unchanged by multisample antialiasing, except: [...] A line is treated as a rectangle made up of two triangles, with a line width of 1.4.
Repro steps
Draw a line on Dx12
using PrimitiveTopology::LineList
or PrimitiveTopology::LineStrip
with MultisampleState.count > 1
.
Expected vs observed behavior
Expected: lines always have 1px.
Observed: lines have 1px for Vulkan
, Gl
, Dx12
without MSAA, but they are thicker than 1px for Dx12
with MSAA.
Extra materials
Dx12 with MSAA on Windows |
Vulkan with MSAA on Linux |
---|---|
Platform
I actually do not use Windows at all, but unfortunately our tests at Ruffle started failing on the Windows runner when I started using PrimitiveTopology::LineStrip
(https://github.com/ruffle-rs/ruffle/pull/16619, failing job). I have confirmed that it in fact does look like that on a Windows machine.