../20230921-nicer-water-and-biomes

Nicer water and biomes

I've played around a bit with how rivers and the sea are drawn, as well as with the assignment of biomes to tiles based on moisture and temperature. It's looking quite nice now.

Rivers have flow direction. I pass this to the shader as vertex attribute. I then sample Perlin noise in the fragment shader offset along this direction to make the water appear to flow. I also darken the river towards the centre to give the illusion of deeper water. I find it looks very pleasing.

Shader Tweaker

You can also see the little shader parameter tweaker I made to help tune the ocean rendering. MonoGame exposes shader uniforms, so I can simply query what is there and if the types match something I know how to edit, I can display an edit field to tweak them. I have a simple scene graph where the geometry to be rendered with a shader lives under a node with a reference to that shader, so the tweaking fields are shown in the scene graph debug viewer.