TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Explorable infinite terrain in WebGL (12kb)

2 pointsby freedmandover 4 years ago

2 comments

freedmandover 4 years ago
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&#x27;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:&#x2F;&#x2F;github.com&#x2F;freedmand&#x2F;infiniteterrain" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;freedmand&#x2F;infiniteterrain</a>
jesvschristover 4 years ago
really cool :)