Your comments

Another option is, I see that o.screenPos = o.pos. So both of those outputs are always going to be identical, which is a waste of an output. I'd suggest SF shouldn't output a screenPos at all. And instead, move screenPos entirely to the fragment by simply declaring it in the fragment. For example: float2 screenPos = i.pos. Unless there is some reason that wouldn't work, that I'm not seeing.

Pretty sure this is an easy fix... the structure VertexOutput needs to pack a couple of the uv's into a float4, so that it can cut down on the number of outputs from 12 to 11. If I do this manually, then I won't be able to edit the shader in shader forge anymore. I kind of think shader forge should detect this, and automatically pack two of them into one float4 to avoid this error.

I can actually see through your mesh, so the cracks are almost certainly in the vertices. Could check your shader to ensure that "Tessalation" is turned off, that's really the only thing in shader forge that could alter the position of the vertices.


If Tesselation is off in the shader, then I would check your export and import settings, and also there is a sneaky setting under Edit->Project Settings->Player->Optimizations that can mess with mesh imports, so check that too. If all else fails, I would find an asset like Mesh Toolkit or Mesh Maker to manually fix it in Unity after importing it. Or, write your own script to loop through all the verts, measure their distance from each other, and merge any that are too close together... to try to close up all the gaps along the seam.

Just read the error message, last error (near the top) listed a lerp. Tried messing with the lerp, nothing happened. So I tried the next line, the IF. Messed with that, and got it working. All the data is at the top of the shader. Just used a text editor to remove the | character and everything after it for the IF node, and that broke all the links going into the IF node, and that got it working again.

Michael, i can confirm that the OneMinus node is causing the problem. It's the OneMinus that's connected to the Snowiness slider. Just delete that node, and recreate it, and the problem seems to be fixed.

Michael, in case you still can't open your shader, here's your shader working again: http://pastebin.com/tVMkFqvN

I couldn't find what the problem was but I got it working by breaking all the connections to the IF node. I replaced all the connections to the IF node with a dummy input. You can delete that dummy input and try to link that IF node back up again the way you had it, and see if it breaks again.

Well I donno about the rest of you, but I am working with HUGE shader forge shaders that make heavy use of the "GET" and "SET" nodes, to keep it manageable. Those nodes are great, but I've had to resort to DELETEING "set" nodes just so I could see where all the nodes are that "get" that particular value. Then I once I've seen it, I hit undo and hope it goes back to the way it was. Useually does. :)


Being able to click on a set node, and see it highlight all the corresponding get nodes, would be worth.

I also would like to have this. There are some cases where this would be great:


1) If you have multiple shaders that use a large amount of the exact same code.

2) If you need to import a lot of code from one of Unity's builtin .cginc files

3) You want to split up your shader into individually editable parts.


One thing that would be nice is if there was an option in "Lighting", next to "Custom Lighting", called "cginc". Selecting this mode would disable the Main node entirely., and instead your shader will simply be written to a cginc file. This would make it easier to create cginc files with shader forge. Basically it would simply save all your code nodes, and any of your global variables and stuff, to the cginc file, and it would not create a shader (no frag or vert functions).

Technically, I'm not sure if shader forge even support 5.4 yet :)

Package has been submitted using Unity 4.5.0, 5.0.0, 5.1.0, 5.2.0, and 5.3.0 to improve compatibility within the range of these versions of Unity.