Topic: Help: Map + Valve's Lab Renderer Shader

Hi Alex,

My project is using Valve's Lab Renderer . It supports up to 18 dynamic shadowing lights in VR. I replaced "TilesetShader.shader" with "vr_standard.shader" and it looked great. But...

But I'm now drawing on the map (I'm using "TilesetDrawingElement.shader") and the drawings are getting clipped by the mesh because I'm using elevation data. I can't use "TilesetShader.shader" because it doesn't show shadows and it is too dark.

Is there a way to combine "vr_standard.shader" and "TilesetShader.shader"? I tried adding code from "TilesetShader.shader" into a copy of "vr_standard.shader" but the result is a black map.

Re: Help: Map + Valve's Lab Renderer Shader

With enough time I might be able to merge the shaders. Depends on how complex the code is and whether or not the two shaders are compatible </nebulous statement>

For someone who isn't familiar with shader code, the answer is "no" (as you can't just smash them together: it'd be like trying to merge flocking with A* just by copy-pasting), for someone who is the answer is "maybe, with a lot of effort."  I've merged shaders before, but it's really a case-by-case sort of problem.

Re: Help: Map + Valve's Lab Renderer Shader

Hello.

To have shadows you can use Tileset Cutout shader.
To make the map brighter, add light or use "Window / Lighting / Ambient Source - Color (white)".

If you still want to use vr_standard.shader, just modify TilesetDrawingElement shader. For example this way:
http://forum.infinity-code.com/viewtopi … 1921#p1921
But this will work well only if you do not have objects above the drawing elements.

Another simple way:
Increase from the script "OnlineMapsTileSetControl.drawingsGameObject.transform.position.y".

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Help: Map + Valve's Lab Renderer Shader

Thanks Draco18s, any help would be appreciated. I was able to add the "surf" function to "vr_standard.shader" without errors but I think it's modifying the wrong values. I don't understand how the input/output logic works with shader functions. I think the other Pass blocks in the Subshader are breaking the "surf" logic.

Alex, unfortunately the post you provided was mine from a while ago. The TilesetDrawingElement modification didn'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'm using "vr_standard.shader" it is broken again. I'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 ("vr_standard.shader").

I could try OnlineMapsTileSetControl.drawingsGameObject.transform.position.y but I can't predict how much to raise it. Not to mention that it would probably position the lines above the map markers.

Re: Help: Map + Valve's Lab Renderer Shader

kalaki wrote:

Thanks Draco18s, any help would be appreciated. I was able to add the "surf" function to "vr_standard.shader" without errors but I think it's modifying the wrong values. I don't understand how the input/output logic works with shader functions. I think the other Pass blocks in the Subshader are breaking the "surf" logic.

You'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.

I think my first shader took me three days to do what I wanted it to do; it's not an easy process at first.  Heck, I still only dive into shader code only when absolutely necessary.  Start with a basic shader that doesn't do anything special, work piece by piece and observe how things change.  Eventually you'll find the part that doesn't do what you expect and you can go in and start poking around to figure out why.