{"id":24135,"date":"2022-02-23T21:33:07","date_gmt":"2022-02-24T02:33:07","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=24135"},"modified":"2022-02-23T21:33:07","modified_gmt":"2022-02-24T02:33:07","slug":"widget-wednesdays-8","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=24135","title":{"rendered":"Widget Wednesdays #8"},"content":{"rendered":"<p>Around seven or eight years ago I was trying all sorts of things to enhance the look of my Chalktalk interactive drawing program. One thing that was really important to me was line quality.<\/p>\n<p>I wanted to be able to render beautiful 3D lines, which tapered and had rounded ends, as though you were drawing with a high quality magical paintbrush in 3D. But I also wanted it to run very fast.<\/p>\n<p>So I wrote a special shader just for drawing those sorts of lines. My first test was just to see if I could render <a href=\"http:\/\/kenperlin.com\/stroke_shader\/index4.html\">two curved tapered lines in space<\/a>, as seen from different points of view.<\/p>\n<p>Once I got that working, I tried ramping things up a bit. I generated a more ambitious test, with <a href=\"http:\/\/kenperlin.com\/stroke_shader\/index6a.html\">lots of squiggly tapered 3D lines<\/a>.<\/p>\n<p>When that seemed to work ok, I really went for it. I modified the program to generate <a href=\"http:\/\/kenperlin.com\/stroke_shader\/index6.html\">1000 tangled up squiggly lines in 3D<\/a>.<\/p>\n<p>To my surprise, it still looked great, and it still ran really fast. Hardware accelerated shaders are really amazing, aren&#8217;t they?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Around seven or eight years ago I was trying all sorts of things to enhance the look of my Chalktalk interactive drawing program. One thing that was really important to me was line quality. I wanted to be able to render beautiful 3D lines, which tapered and had rounded ends, as though you were drawing &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=24135\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Widget Wednesdays #8&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/24135"}],"collection":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24135"}],"version-history":[{"count":4,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/24135\/revisions"}],"predecessor-version":[{"id":24139,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/24135\/revisions\/24139"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24135"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}