Figured I’d throw this out there: does anyone know the fastest way to *conservatively* rasterize lines on GPU? I’ve tried: (1) drawing instanced thin quads; (2) drawing thin quads w/o instancing (~15% faster); (3) glLineWidth(2.0) (fastest on NVIDIA, but deprecated)
Do you mean doing everything in compute shader or rasterizing with line primitives and expanding in compute? The latter doesn’t work because the line could be too short to hit the diamond, unless you’re extending the lines in vertex shading somehow
-
-
I meant the latter. Not sure I understand the diamond comment. You saying there are cases where rasterizer will "hit" >1px away from a pixel that was actually touched by the line?
-
Yeah. Consider a tiny line whose endpoints are infinitesimally close to a pixel corner. Never touches the pixel diamond so nothing will be lit.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.