{"id":256,"date":"2018-06-01T20:00:34","date_gmt":"2018-06-02T01:00:34","guid":{"rendered":"http:\/\/www.chroniclesoftright.com\/blog\/?p=256"},"modified":"2018-06-01T14:28:59","modified_gmt":"2018-06-01T19:28:59","slug":"shader-testing","status":"publish","type":"post","link":"https:\/\/www.chroniclesoftright.com\/blog\/2018\/06\/01\/shader-testing\/","title":{"rendered":"Shader testing"},"content":{"rendered":"<p>I&#8217;ve been digging around in <a href=\"http:\/\/threejs.org\" target=\"_blank\" rel=\"noopener\">THREE.js<\/a> and one of the bits that&#8217;s always confused me is shaders.\u00a0 I&#8217;ve been writing software for some time but every time I look at shader code I just get completely confused.\u00a0 I found a little &#8220;shaders for beginners&#8221; page today and it&#8217;s helped fill in some of the gaps.\u00a0 The primary reason it&#8217;s so confusing (at least when using THREE.js) is that THREE.js does a lot of the grunt work for you and that hidden grunt work makes examples incomprehensible if you don&#8217;t know what THREE.js is doing in the background.\u00a0 Since I understand that a bit better now it affects some design choices going forward.\u00a0 For instance, I am now convinced that implementing <a href=\"https:\/\/en.wikipedia.org\/wiki\/Texture_splatting\" target=\"_blank\" rel=\"noopener\">splat maps<\/a> for the terrains in Lyridia is completely doable.\u00a0 It will require some custom tools to do it well but I see no reason I can&#8217;t use an essentially arbitrary number of textures for each terrain chunk and mix them together with a shader.<\/p>\n<p>This is a really big deal because using textures for the terrain means I&#8217;ll need to use textures on every other asset as well.\u00a0 I&#8217;m not 100% ready to pull the trigger on this yet but I definitely want the game to have as wide an appeal as possible and a world with textured assets will be more familiar to more players so the decision might be made for me already.\u00a0 We&#8217;ll see.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been digging around in THREE.js and one of the bits that&#8217;s always confused me is shaders.\u00a0 I&#8217;ve been writing software for some time but every time I look at shader code I just get completely confused.\u00a0 I found a little &#8220;shaders for beginners&#8221; page today and it&#8217;s helped fill in some of the gaps.\u00a0&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-256","post","type-post","status-publish","format-standard","hentry","category-planning-and-development"],"_links":{"self":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":1,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"predecessor-version":[{"id":257,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/256\/revisions\/257"}],"wp:attachment":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/tags?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}