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)
Yeah. Consider a tiny line whose endpoints are infinitesimally close to a pixel corner. Never touches the pixel diamond so nothing will be lit.
-
-
Oh I see.. Yeah if the line is so short it doesn't "exit" through one of the neighboring diamonds you'd have to extend it or something.
-
I feel like at that point you might as well rasterize all lines as axis aligned lines along their major axis. In each fragment shader invocation calculate the 2 minor-axis positions and use image load/store or whatever to write to the appropriate spot.
- 1 more reply
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.