As was pointed out by @rconde01 in the matrix chat, the wireframe sample suffers from Z fighting that gives the wireframes a very aliased, sparkly appearance. This PR adds an adjustable depthBias and depthBiasSlopeScale slider that can be used both to improve the appearance of the wireframe and help visualize for users the effect those values have.
Before:
After:
Bias is applied to the lit mesh rather than the wireframe because apparently line and point primitives don't consider depth bias when rendering! Didn't know that previously. I've also added a checkbox to pause the scene's animation, as I found that helpful when specifically looking for the effects of the depth bias.
This is great! I actually tried adding that too and when I didn't see a difference I gave up for a while. I'm glad you figure out why it wasn't working for me.
As was pointed out by @rconde01 in the matrix chat, the wireframe sample suffers from Z fighting that gives the wireframes a very aliased, sparkly appearance. This PR adds an adjustable
depthBias
anddepthBiasSlopeScale
slider that can be used both to improve the appearance of the wireframe and help visualize for users the effect those values have.Before:
After:
Bias is applied to the lit mesh rather than the wireframe because apparently line and point primitives don't consider depth bias when rendering! Didn't know that previously. I've also added a checkbox to pause the scene's animation, as I found that helpful when specifically looking for the effects of the depth bias.