Custom Transparent shaders not working (defaults do work) (example inside)
I'm writing a little blast shader that is supposed to go off when you near the ground. This is what it is supposed to look like:
However, this is what it actually looks like:
If you look really close, you can see that the effect is only drawn over the lander. In fact, it draws over random objects at random angles. I know why this is, because of the draw order, but my shader contains the right code to solve it.
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" "IgnoreProjector" = "True" }
ZWrite Off
Blend SrcAlpha OneMinusSrcAlpha
Inbuilt unity shaders (for example this additive particle shader) works just fine
(not the prettiest example, but it gives the right impression)
I tried random custom shaders from the internet, and they all give the same problem, even though they work in their examples.
Any ideas?
(using Unity 5.2.0f3 personal)
Ok, well, I figured it out: If anyone is running into the same issue, do the following:
Click the material and assign a different shader. Then reassign the custom shader. Try this a few times. If this doesn't work, restart unity and try again.