weBIGeo / webigeo

Rendering system for weBIGeo.
GNU General Public License v3.0
4 stars 0 forks source link

Snow cover overlay #32

Closed pkomon-tgm closed 2 months ago

pkomon-tgm commented 2 months ago

Implement snow cover overlay.

First port the old snow cover to a compute shader. We can probably reuse most of the infrastructure already present for the normal compute shader.

pkomon-tgm commented 2 months ago

The snow cover works now, but there are a few visible artifacts still. The snow cover overlay looks pixelated compared to the screen space snow cover overlay from Alpine Maps, which is partly expected (due to the texture having a fixed size), but this could be improved by using linear filtering the height for normal calculation (+outputting higher resolution textures). Another visible artifact is popping, which we assume is present because we are still using average for downsampling. Switching to maximum should improve that as well.

EDIT: It seems linear filtering of unsigned/signed integer textures is not supported by wgsl. We'll have to implement it ourselves.

pkomon-tgm commented 2 months ago

snow overlay in render pipline implemented in ad3ec84a60653a6dc78b5b0c913e5849b43d974d using compute output normals in render implemented in d623d7e533fcd62ea4231c31e54a187044e53a21 stepping fixed in d05bcb69a1a1a4bbda4d4cebce40a18c6c154047 by implementing an upsample node that bilinearly filters an input texture

This can be considered done 🎉