noshadow turns off shadow receiving but still casts shadows.
By default a surface shader does not generate a shadowcaster pass, but instead uses the shadowcaster from the Fallback. Remove the Fallback, no more shadow. It’ll also prevent that shader from showing up in the camera depth texture when using the forward rendering path!
or just add this on the shader Tag
Tags { “ForceNoShadowCasting” = “True”}
This has the same side effect of not drawing the shader in the camera depth texture FYI. The ShadowCaster pass is used for both the depth texture and shadow maps, and that tag just causes the shader to pretend it doesn’t have that pass. In Unity 4 it would only prevent shadow casting, but that was because Unity 4 had a separate shadow receiver pass that was used for the camera depth texture.
huh, interesting , it’s still working on 5.5 tho
thanks bgolus, it works, plus I learned something else about surface shader!
don’t you love necro threads.
removing the fallback worked in forward but seems to cast a shadow in deferred (the dark square)
in the game view

in the scene view

this is the shader
Shader "Mobile/Particles/Multiply Culled" {
Properties {
_MainTex ("Main Texture", 2D) = "white" {}
}
Category {
Tags {"IgnoreProjector"="True" "Queue" = "Transparent" "ForceNoShadowCasting" = "True"}
Blend Zero SrcColor
Lighting Off ZWrite Off Fog { Mode Off }
BindChannels {
Bind "Color", color
Bind "Vertex", vertex
Bind "TexCoord", texcoord
}
// ---- Dual texture cards
SubShader {
// Tags {"Queue" = "Transparent" }
Pass {
Offset -1, -100
SetTexture [_MainTex] {
combine texture * primary
}
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine previous lerp (previous) constant
}
}
}
// ---- Single texture cards (does not do particle colors)
SubShader {
Tags {"Queue" = "Transparent" }
Pass {
Offset -1, -1
SetTexture [_MainTex] {
constantColor (1,1,1,1)
combine texture lerp(texture) constant
}
}
}
}
}
Not a shadow. Those are fixed function shaders, support for which has been deprecated, and they now act like shader generators, but I honestly have no idea what kind of shader code they’re going to produce. Lots of Unity’s original particle shaders were written as fixed function shaders, and I rewrote them all by hand the version they were deprecated in (5.1 I think?) as the shaders they generated were close, but exactly the same as their original functionality, and in some cases were much, much slower.
I would assume whatever shader code those are generating is just doing something bad.
TLDR; don’t use fixed function shaders.
ok, I’ll rewrite that one. thanks again.