Whenever I draw a polygon using opengl the edges look bad because straight lines look bad. I want the edges to have nice soft antialiased edges but that's not how opengl draws polygons. Multisampling AA doesn't help as much as I expect it to.
Try replacing smoothstep with this (untested):https://gist.github.com/pcwalton/3834632f696e02c72cf93adf09b7afa5 …
-
-
thank you! that looks similar to one of my attempts, but the result is kind of strange, especially for thin lines left: old, about what I would expect right: your replacementpic.twitter.com/bDrOZECZG5
-
I think the problem is the arguments you’re passing into smoothstep. Don’t have time to debug it right now but in general the polynomial wants to take absolute distance (so 0 is center of pixel is right on the line, sqrt(2) is max distance, etc)
- 2 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.