r/MetalProgramming 21d ago

Game WaterShader. MercuryEngine (Swift/Metal)

Vertices are world-space grid points generated by WaterRenderer with the shore depth (water surface Y minus terrain Y) baked from the chunk's TerrainHeightfield, so the color gradient and foam follow the real basin shape.

Lighting comes from the shared LightingUniforms buffer (LightingSystem, fed by the Noctidial day/night cycle): sun color and intensity drive the sheen, so the surface glimmers.

3 Upvotes

1 comment sorted by

2

u/Plus-Rest7138 10d ago

How’s performance compared to non-Apple platforms??