Shadow catcher or Matte shadow shader
https://forum.unity3d.com/threads/matte-shadow.14438/
https://forum.unity3d.com/threads/no-shadows-visible-on-transparency-shaders.9909/page-2
https://forum.unity3d.com/threads/no-shadows-visible-on-transparency-shaders.9909/
https://forum.unity3d.com/threads/matte-shadow.14438/
https://forum.unity3d.com/threads/shader-for-displaying-self-shadow-without-rendering-the-actual-object.64941/#post-422023
http://answers.unity3d.com/questions/643513/how-to-cast-a-shadow-onto-an-invisible-quadplane.html
http://answers.unity3d.com/questions/825633/unity-5-invisible-shadow-caster-shader.html
work!!
http://wiki.unity3d.com/index.php?title=TransparentShadowReceiver
Unity tries to draw the opaque objects that are closest to the camera first.
Unity tries to draw the opaque objects that are closest to the camera first. This is the most efficient way to render overlapping geometry. Unfortunately, this doesn't work for semitransparent geometry, because it has to be blended with whatever lies behind it. So transparent geometry has to be drawn the other way around. The furthest objects are drawn first, and the closest are drawn last. That's why transparent things are more expensive to draw than opaque things.
To determine the draw order of geometry, Unity uses the the position of their centers. This works fine for small objects that are far apart. But it doesn't work so well for large geometry, or for flat geometry that's positioned close together. In those cases, the draw order can suddenly flip while you change the view angle. This can cause a sudden change in the appearance of overlapping semitransparent objects.
http://catlikecoding.com/unity/tutorials/rendering/part-11/
http://catlikecoding.com/unity/tutorials/rendering/part-12/
For special uses in-between queues can be used. Internally each queue is represented by integer index; Background
is 1000, Geometry
is 2000, AlphaTest
is 2450, Transparent
is 3000 and Overlay
is 4000. If a shader uses a queue like this:
Tags { "Queue" = "Geometry+1" }
This will make the object be rendered after all opaque objects, but before transparent objects, as render queue index will be 2001 (geometry plus one). This is useful in situations where you want some objects be always drawn between other sets of objects. For example, in most cases transparent water should be drawn after opaque objects but before transparent objects.
Queues up to 2500 (“Geometry+500”) are consided “opaque” and optimize the drawing order of the objects for best performance.Higher rendering queues are considered for “transparent objects” and sort objects by distance, starting rendering from the furthest ones and ending with the closest ones. Skyboxes are drawn in between all opaque and all transparent objects.
custom shadow map:
http://gamedev.stackexchange.com/questions/38169/custom-shadow-mapping-in-unity-3d-free-edition
https://forum.unity3d.com/threads/implementing-custom-shadow-map-filtering.256998/
http://gamedev.stackexchange.com/questions/96335/custom-shadowmapping-in-unity-not-working-properly