I’m rewriting the mapgen4 renderer in this branch.
So far:
- switch render.ts from regl.js to using WebGL directly, which halves the download size
- use a gpu shader instead of cpu canvas to draw river shapes, which simplifies the code and sharpens rivers
- switch from WebGL1 to WebGL2, because there are WebGL2 features I want to use
- use WebGL2 Vertex Array Objects, a minor performance win
- use WebGL2 R16F format to store elevation data in renderer, which enables linear texture lookups, which make the map smoother
- use WebGL2 R16F format to store depth data in renderer, which solves a loss of precision
- use WebGL2’s built in
gl_VertexID
for the river shader, which removes one extra attribute buffer - add a
mountain_folds
slider to control how deep the folds go, and have them only apply at higher elevations