<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Markers as filters to draw map]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2203&amp;type=atom" />
	<updated>2023-11-27T18:36:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2203</id>
		<entry>
			<title type="html"><![CDATA[Re: Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9275#p9275" />
			<content type="html"><![CDATA[<p>Make a float array in the shader that looks like [m1.x, m1.z, m2.x, m2.z, ... etc] and pass it to the shader.<br /><a href="https://stackoverflow.com/questions/45098671/how-to-define-an-array-of-floats-in-shader-properties">https://stackoverflow.com/questions/450 … properties</a><br />In the shader, make a loop that will go through all the world positions of the markers, and calculate the texture color.<br />Actually it will be a fairly uncomplicated shader that will have good performance.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-11-27T18:36:00Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9275#p9275</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9274#p9274" />
			<content type="html"><![CDATA[<p>Got it. Any hint on how to pass multiple markers positions + radius to the custom shader? Because with the built-in Properties I&#039;m not sure I&#039;m able to.</p><p>Or would I need to provide a dynamically built texture to be used as a mask? Could this compromise performance?</p>]]></content>
			<author>
				<name><![CDATA[victors.cv]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2802</uri>
			</author>
			<updated>2023-11-26T23:38:33Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9274#p9274</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9273#p9273" />
			<content type="html"><![CDATA[<p>You do not need to modify or inherit Tileset.<br />Just specify your shader in the Tileset / Materials &amp; Shaders / Tileset Shader field.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-11-26T22:01:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9273#p9273</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9272#p9272" />
			<content type="html"><![CDATA[<p>Thank you Alex!</p><p>So I&#039;ll create a new shader an add it as a final step to the tileset rendering, through inheritance of the MonoBehaviour responsible for rendering (OnlineMapsTileSetControl). Extend controller class and leave the original shaders intact. WDYT?</p><p>I&#039;m not that experienced with shader programming but I&#039;ll give it a try nevertheless. If it works, I&#039;ll be happy to share it to complement the examples repo.</p>]]></content>
			<author>
				<name><![CDATA[victors.cv]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2802</uri>
			</author>
			<updated>2023-11-26T13:59:54Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9272#p9272</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9271#p9271" />
			<content type="html"><![CDATA[<p>Hello.</p><p>I think the best way to achieve this is to make a custom shader that will store the world positions of the markers (and update them when the map is moved) and draw the map only within a certain radius of the marker.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-11-26T11:26:17Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9271#p9271</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Markers as filters to draw map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9269#p9269" />
			<content type="html"><![CDATA[<p>Hello everyone, hope you are all doing fine!</p><p>I want to make something similar to the <a href="https://infinity-code.com/atlas/online-maps/pages/BouncingCircle.html">Bouncing Circle example</a>, but instead of creating drawing polys around the markers, I want to use the markers as filters to render the other map elements. </p><p>In other words, I want a blank map (custom texture) that only draws real map data around markers. Picture it as candles (markers) in the dark (custom texture). Like in Bouncing Circle example, rendered area should respect the map zoom and multiple filter markers should be supported.</p><p>What would be the best approach to achieve this? Any help in this matter will be much appreciated.</p><p>Thanks in advance,</p><p>Victor</p>]]></content>
			<author>
				<name><![CDATA[victors.cv]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2802</uri>
			</author>
			<updated>2023-11-26T00:56:42Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9269#p9269</id>
		</entry>
</feed>
