I swear I'm OP. Just on different machines all the time.
>What do you mean by a "second color attachment" ?
What I've got is an engine that has:
1. Several variations of a "Blit" function
2. One of these variations features a uint32_t as an "additionalData" parameter. Basically, this is data that will be passed to the second color attachment
3. The result is that the Framebuffer being drawn to has two Color Attachmenets.
The first color attachment is what's drawn to the screen after a second full-screen quad is drawn. I've done this so in future I can do some full-screen post-processing effects.
The second color attachment is a R32UI format texture. It's sole purpose is to take that "additionalData" parameter before and store it at a pixel level.
So. What that means is is that if I draw a tile, all of the non-transparent pixels that end up on the screen have the additionalData stored in that pixel on the second attachment.
The map is stored in a 1-dimensional array. This means each tile in my map has a single index within this array. Each tile is providing it's index when it is drawn.
End result is the texture bound in the second color attachment has a single uint32_t value in place of the usual RGB values for each pixel. This then allows me to "read" the tile index that each pixel belongs to (and some pixels might not be map tiles at all).
So mapping the mouse coords to map-tile-index becomes a single "read this pixel" from the buffer and retrieve the tile-index.
>You should be using an quadtree or some other compression method for your tiles.
Can you elaborate? Why would I need compression at all?
>You can probably compute some formula to project the mouse coordinates onto the world, since it's just a matter of finding a rotation matrix that can rotate a point on the screen to a point in the isometric plane.
I did this initially, but the problem is my tiles are like Sim City 2000 with the elevation. Or basically, I no longer have a flat plane, it's rugged.