<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Transparent tile support?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=477</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=477&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Transparent tile support?.]]></description>
		<lastBuildDate>Tue, 28 Mar 2017 14:03:45 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Transparent tile support?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2104#p2104</link>
			<description><![CDATA[<p>Hello.</p><p>OnlineMapsTileSetControl.OnDrawTile is called for each drawn tile, and you can do incredible tricks using this method.<br />Example is attached.</p><p>You can store any of your data in OnlineMapsTile.customData.<br />If you need to store more than one object, just create a class with your data, and store the reference in this variable.</p><p>I do not see the point in OnlineMapsTile.GetExistingTileTexture, because you have direct access to OnlineMapsTile.texture and OnlineMapsTile.overlayBackTexture, so you can just use it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 28 Mar 2017 14:03:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2104#p2104</guid>
		</item>
		<item>
			<title><![CDATA[Transparent tile support?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2097#p2097</link>
			<description><![CDATA[<p>Hi Alex,<br />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 <span style="color: #000099">CustomDownloadTileExample</span> and I’m using the default tile shader.</p><p>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.</p><p>I see a few options:</p><p>1. Add code to my custom tileset loader to load the low resolution texture and assign it to <span style="color: #000099">tile.overlayBackTexture</span>. 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.</p><p>2. Is there something you could add to OnlineMapsTile when I load a texture that would tell <span style="color: #000099">OnlineMapsTileSetControl.UpdateMapSubMesh</span> to assign a low resolution texture to <span style="color: #000099">tile.overlayBackTexture</span>? Similar to what you do in the while loop at <span style="color: #000099">OnlineMapsTileSetControl.cs:1527</span>.</p><p>3. Add a new function to <span style="color: #000099">OnlineMapsTile</span> that would return me a Texture2D of whatever it has already loaded?&nbsp; Example: <span style="color: #000099">Texture2D OnlineMapsTile.GetExistingTileTexture(zoom, x, y)</span>. I could then assign this to&nbsp; tile.overlayBackTexture when I load a transparent texture. This will consume more memory though.</p><p>Any other ideas?</p>]]></description>
			<author><![CDATA[null@example.com (kalaki)]]></author>
			<pubDate>Mon, 27 Mar 2017 19:10:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2097#p2097</guid>
		</item>
	</channel>
</rss>
