{"id":19530,"date":"2018-01-10T19:38:13","date_gmt":"2018-01-11T00:38:13","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=19530"},"modified":"2018-01-10T19:39:29","modified_gmt":"2018-01-11T00:39:29","slug":"cg-programming-for-non-programmers-lesson-8","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=19530","title":{"rendered":"CG programming for non-programmers, lesson 8"},"content":{"rendered":"<p>For the eighth lesson, we are going to learn how to make edges.<\/p>\n<p>It turns out that there is a shader function called <code>step(a,b)<\/code> that does this, where <code>a<\/code> and <code>b<\/code> are the two arguments to the function.<\/p>\n<p>The <code>step<\/code> function returns either <code>0.0<\/code> or <code>1.0<\/code>, depending on which of its two arguments is larger.<\/p>\n<p>You can use the <code>step<\/code> function to make colors change suddenly.  In other words, to make edges.<\/p>\n<p>And if we can make edges now, then soon we will be able to make shapes, which will be really cool!<\/p>\n<p>You can see this lesson by <a href=http:\/\/mrl.nyu.edu\/~perlin\/cg\/lesson8>CLICKING HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the eighth lesson, we are going to learn how to make edges. It turns out that there is a shader function called step(a,b) that does this, where a and b are the two arguments to the function. The step function returns either 0.0 or 1.0, depending on which of its two arguments is larger. &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=19530\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CG programming for non-programmers, lesson 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\/19530"}],"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=19530"}],"version-history":[{"count":3,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19530\/revisions"}],"predecessor-version":[{"id":19533,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19530\/revisions\/19533"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19530"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}