Fix this shader please...

Was working great - now just randomly decides to renders 100% transparent. Seriously regretting the upgrade to 4.3.

solved by deleting and re-importing shader

Okay it’s not solved.

I compile the shader once, and it works.

I close the project, open it again… and the shader is broken. It looks fine in the little preview window, but in game it doesn’t show up.

Any help with this would be appreciated.

I am working with surface shaders.

It is specifically an error with alpha tag.

If Unity is giving you an error, it’s easier for people to figure out what it means if you tell them what it says.

If at least the program was consistent!

The shader compiles without issue.

It is a transparent shader.

I save the project, close it, and when I open it again the shader is FUBAR!

A bunch of opaque objects behind the transparent object are rendering on top of it.

Why would closing and re-opening the program change the way the shader works???

The render queue may be wrong. Why don’t you just show the shader?

Alright,

You were right…

I had “rendertype” = “transparent” not “queue” = “transparent”, so the queue was wrong. It was just confusing me because it was working, and then not working.

Render queues can be really irritating to debug. The other easy mistake is putting the RenderQueue tag inside a Pass instead of in the SubShader. Because it’s a tag rather than an actual Shaderlab command, it just silently fails to do anything when it’s in the wrong place.