<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Help: Map + Valve's Lab Renderer Shader]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=500&amp;type=atom" />
	<updated>2017-04-13T14:55:21Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=500</id>
		<entry>
			<title type="html"><![CDATA[Re: Help: Map + Valve's Lab Renderer Shader]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2215#p2215" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>kalaki wrote:</cite><blockquote><p>Thanks Draco18s, any help would be appreciated. I was able to add the &quot;surf&quot; function to &quot;vr_standard.shader&quot; without errors but I think it&#039;s modifying the wrong values. I don&#039;t understand how the input/output logic works with shader functions. I think the other Pass blocks in the Subshader are breaking the &quot;surf&quot; logic.</p></blockquote></div><p>You&#039;ll have to play with it, and probably look up other examples of surface shaders, what their inputs are, how they modify the data, what they return and so on.</p><p>I think my first shader took me three days to do what I wanted it to do; it&#039;s not an easy process at first.&nbsp; Heck, I still only dive into shader code only when absolutely necessary.&nbsp; Start with a basic shader that doesn&#039;t do anything special, work piece by piece and observe how things change.&nbsp; Eventually you&#039;ll find the part that doesn&#039;t do what you expect and you can go in and start poking around to figure out why.</p>]]></content>
			<author>
				<name><![CDATA[Draco18s]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=429</uri>
			</author>
			<updated>2017-04-13T14:55:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2215#p2215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Help: Map + Valve's Lab Renderer Shader]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2196#p2196" />
			<content type="html"><![CDATA[<p>Thanks Draco18s, any help would be appreciated. I was able to add the &quot;surf&quot; function to &quot;vr_standard.shader&quot; without errors but I think it&#039;s modifying the wrong values. I don&#039;t understand how the input/output logic works with shader functions. I think the other Pass blocks in the Subshader are breaking the &quot;surf&quot; logic.</p><p>Alex, unfortunately the post you provided was mine from a while ago. The TilesetDrawingElement modification didn&#039;t work well with my map markers for the reason you mentioned. So I took your advice and got everything working after I upgrading to the latest release. But now that I&#039;m using &quot;vr_standard.shader&quot; it is broken again. I&#039;ll try Tileset Cutout shader but I doubt it will work. The only way to get real time shadows with the Lab Render is to use their shader (&quot;vr_standard.shader&quot;).</p><p>I could try OnlineMapsTileSetControl.drawingsGameObject.transform.position.y but I can&#039;t predict how much to raise it. Not to mention that it would probably position the lines above the map markers.</p>]]></content>
			<author>
				<name><![CDATA[kalaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=215</uri>
			</author>
			<updated>2017-04-13T02:31:45Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2196#p2196</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Help: Map + Valve's Lab Renderer Shader]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2192#p2192" />
			<content type="html"><![CDATA[<p>Hello.</p><p>To have shadows you can use Tileset Cutout shader.<br />To make the map brighter, add light or use &quot;Window / Lighting / Ambient Source - Color (white)&quot;.</p><p>If you still want to use vr_standard.shader, just modify TilesetDrawingElement shader. For example this way:<br /><a href="http://forum.infinity-code.com/viewtopic.php?pid=1921#p1921">http://forum.infinity-code.com/viewtopi … 1921#p1921</a><br />But this will work well only if you do not have objects above the drawing elements.</p><p>Another simple way:<br />Increase from the script &quot;OnlineMapsTileSetControl.drawingsGameObject.transform.position.y&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-04-12T22:48:07Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2192#p2192</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Help: Map + Valve's Lab Renderer Shader]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2187#p2187" />
			<content type="html"><![CDATA[<p>With enough time I <em>might</em> be able to merge the shaders. Depends on how complex the code is and whether or not the two shaders are compatible &lt;/nebulous statement&gt;</p><p>For someone who isn&#039;t familiar with shader code, the answer is &quot;no&quot; (as you can&#039;t just smash them together: it&#039;d be like trying to merge flocking with A* just by copy-pasting), for someone who is the answer is &quot;maybe, with a lot of effort.&quot;&nbsp; I&#039;ve merged shaders before, but it&#039;s really a case-by-case sort of problem.</p>]]></content>
			<author>
				<name><![CDATA[Draco18s]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=429</uri>
			</author>
			<updated>2017-04-12T19:05:46Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2187#p2187</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Help: Map + Valve's Lab Renderer Shader]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2184#p2184" />
			<content type="html"><![CDATA[<p>Hi Alex,</p><p>My project is using <a href="https://github.com/ValveSoftware/the_lab_renderer">Valve&#039;s Lab Renderer </a>. It supports up to 18 dynamic shadowing lights in VR. I replaced &quot;TilesetShader.shader&quot; with &quot;<a href="https://github.com/ValveSoftware/the_lab_renderer/blob/master/Assets/TheLabRenderer/Shaders/vr_standard.shader">vr_standard.shader</a>&quot; and it looked great. But...</p><p>But I&#039;m now drawing on the map (I&#039;m using &quot;TilesetDrawingElement.shader&quot;) and the drawings are getting clipped by the mesh because I&#039;m using elevation data. I can&#039;t use &quot;TilesetShader.shader&quot; because it doesn&#039;t show shadows and it is too dark.</p><p>Is there a way to combine &quot;<a href="https://github.com/ValveSoftware/the_lab_renderer/blob/master/Assets/TheLabRenderer/Shaders/vr_standard.shader">vr_standard.shader</a>&quot; and &quot;TilesetShader.shader&quot;? I tried adding code from &quot;TilesetShader.shader&quot; into a copy of &quot;vr_standard.shader&quot; but the result is a black map.</p>]]></content>
			<author>
				<name><![CDATA[kalaki]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=215</uri>
			</author>
			<updated>2017-04-12T18:38:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2184#p2184</id>
		</entry>
</feed>
