Shader testing

Planning and Development

I’ve been digging around in THREE.js and one of the bits that’s always confused me is shaders.  I’ve been writing software for some time but every time I look at shader code I just get completely confused.  I found a little “shaders for beginners” page today and it’s helped fill in some of the gaps.  The primary reason it’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’t know what THREE.js is doing in the background.  Since I understand that a bit better now it affects some design choices going forward.  For instance, I am now convinced that implementing splat maps for the terrains in Lyridia is completely doable.  It will require some custom tools to do it well but I see no reason I can’t use an essentially arbitrary number of textures for each terrain chunk and mix them together with a shader.

This is a really big deal because using textures for the terrain means I’ll need to use textures on every other asset as well.  I’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.  We’ll see.

Leave a Reply

Your email address will not be published. Required fields are marked *