Hi HackerNews!<p>This is a test project I hacked together to see how efficiently I could build an explorable, procedurally generated 3D world. I'd previously tested some infinite terrain ideas in Three.JS but the resulting code was hundreds of kilobytes and slowed down my computer significantly.<p>I learned the basics of vertex and fragment shaders for this project, and realized that infinite terrain could be rendered efficiently by creating a fixed plane mesh and modulating its vertices with the vertex shader using a noise function that takes into account player movement. The resulting demo app runs smoothly on my laptop and mobile device.<p>Source code here: <a href="https://github.com/freedmand/infiniteterrain" rel="nofollow">https://github.com/freedmand/infiniteterrain</a>