Masked material which casts unmasked shadows

Currently, it is only possible to cast shadows from masked version of the object. But imagine this situation:

  • you are developing wall-hiding system similar to XCOM or Sims system
  • you want smooth blending between visible->invisible states (blending animation)

The only solution is to create shadow-casting geometry (which is not visible) and separate geometry that is visible but does not cast shadows and have masked material (masked material is used for smoothly fading out an object). This is quite problematic because you are doubling number of objects on the scene. Of course, you can bake you lighting and hide your geometry with masked material but it is not an option when your game needs to have dynamic lighting.

If it would be possible to cast shadows from unmasked geometry it would solve this problem.