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)
-
Show this thread
-
Replying to @pcwalton
Directx has dedicated support for conservative rasterization (https://docs.microsoft.com/en-us/windows/win32/direct3d11/conservative-rasterization …, https://docs.microsoft.com/en-us/windows/win32/direct3d12/conservative-rasterization …), Have you tried it, or is it just non-viable for you (IIRC your stuff is mostly GL)
1 reply 0 retweets 0 likes -
Replying to @thomcsc
I have no hardware with support for it :( It’s new NVIDIA and Intel only, no AMD. Also Metal doesn’t support it.
1 reply 0 retweets 1 like -
Replying to @pcwalton
thom Retweeted thom
Well... In that case...
https://twitter.com/thomcsc/status/1263575493925720064 …thom added,
1 reply 0 retweets 2 likes -
Replying to @thomcsc
Yeah, the problem is the spec doesn’t require glLineWidth to be supported with anything greater than 1. ANGLE supports only 1. Metal and D3D don’t support line width at all, though D3D does support antialiased lines so that might be an alternative.
2 replies 0 retweets 0 likes -
Replying to @pcwalton
Right, I was half joking. My experience with lineWidth and pointSize is that they don't work or only worksfor values <= 1 on my dev hardware. I'd probably do quads but I also was never really a graphics person.
1 reply 0 retweets 1 like
Yeah, I’m probably going to go with instanced quads because I’m afraid to ship glLineWidth to Firefox/Servo users, but it’s so tempting because it’s like a 2x speedup on my GeForce 940M.
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.