I have made a program that draws meshes together with their wireframe.
There is z-fighting between the triangles and the line.
For solving this, I use depth biasing on the pipeline that draws the triangles.
I would have preferred to apply the inverse bias on the lines, since it would fit better my code organization. However, in the Vulkan spec, I only see depth bias referencing “polygons”:
25.9.3. Depth Bias The depth values of all fragments generated by the rasterization of a polygon can be biased (offset) by a single depth
bias value that is computed for that polygon.
That made me a bit sad.
But I gave it a chance and… it worked!
I was indeed able to apply the depth bias on the lines instead!
So I’m wondering, it this correct behaviour? Do lines also count as polygons? Or is it a bug in my Vulkan driver?
I’m using a Radeon RX6600.