Topic: Transparent tile support?
Hi Alex,
I have a list of directories that I load tiles from. Think of them like layers. For example, one directory contains “blue marble” tiles and the other contains high resolution tiles. I wrote a custom tileset loader that is similar to CustomDownloadTileExample and I’m using the default tile shader.
The tiles in the high resolution directory are semi-transparent. Unfortunately the transparent parts of the image appear black on the map. This is because there is no image underneath them. I would like the low res tiles to show through the transparent areas.
I see a few options:
1. Add code to my custom tileset loader to load the low resolution texture and assign it to tile.overlayBackTexture. Unfortunately I don’t know how to size/offset them correctly. It also means I’ll be loading this low resolution texture from disk multiple times.
2. Is there something you could add to OnlineMapsTile when I load a texture that would tell OnlineMapsTileSetControl.UpdateMapSubMesh to assign a low resolution texture to tile.overlayBackTexture? Similar to what you do in the while loop at OnlineMapsTileSetControl.cs:1527.
3. Add a new function to OnlineMapsTile that would return me a Texture2D of whatever it has already loaded? Example: Texture2D OnlineMapsTile.GetExistingTileTexture(zoom, x, y). I could then assign this to tile.overlayBackTexture when I load a transparent texture. This will consume more memory though.
Any other ideas?