Closed pkomon-tgm closed 4 months ago
On his fork, @adam-ce already implemented a hashmap for texture array index lookup. The hashmap uses a 2d texture for collision handling and one for actual lookups. The use of textures here is necessary because AlpineMaps uses OpenGL 3.3 Core, but storage buffers were only introduced in 4.3.
We will adapt this hashmap implementation for webigeo, but replace the texture with a storage buffers (probably slightly faster random access and no hash->u,v conversion).
Implemented basic storing and clearing of hashmap entries in GPU storage buffer (50aeb89)
Next steps:
compute/
Has been implemented for some time now, finally used in compute pipeline to calculate correct normals (0ca950cc225809c9a0f63a92dbdf6c5c8f766a7f). Closing this.
For rendering overlays, it is necessary to determine whether there is an (overlay) texture available for a given tile to be rendered. For the compute pipeline, there will be cases where it is necessary to access neighboring tiles or even farther away tiles.
Therefore we want a generic solution that allows GPU shader code to lookup up available tile data by tile id.
One possible solution would be to have a hash map that maps tile-id to texture array index (or to a struct holding more than one index, if needed).