Search Unity

Faded Object Help

Discussion in 'Shaders' started by Justafin, Jan 14, 2016.

  1. Justafin

    Justafin

    Joined:
    Aug 6, 2012
    Posts:
    30
    Was hoping someone would be able to offer suggestions on how to pull of an effect. My goal is to be able to partially fade an opaque object, have it self-sorting so that only the visible front facing geometry is drawn, have it still cast and receive shadows as well as having any objects contained within the object also receiving proper shadows. So far I've been able to achieve everything except having the object correctly receive shadows as well as the objects within it receiving shadows.

    Thanks for any input,
    Justin
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,342
    You can do this with a z depth pre-pass transparency shader with a shadow caster pass. But know the shadow will be the one that would be there if the object was still there and opaque, the alternative is that it doesn't receive shadows at all.