Search Unity

Shadows determined by Normals, not by Geometry: is this possible?

Discussion in 'Global Illumination' started by ciapoide121, Dec 21, 2017.

  1. ciapoide121

    ciapoide121

    Joined:
    Aug 30, 2014
    Posts:
    10
    Dear Community,

    Is there a way to cast a shadow whose shape is determined by the normals, rather than by the geometry of the object it is cast upon?

    See the following pic for an explanation:


    Thanks!
     
  2. ciapoide121

    ciapoide121

    Joined:
    Aug 30, 2014
    Posts:
    10
    hmm, in general something else that could be done to influence the shape of the shadow, that is not geometry?
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,511
    Historically we'd be modifying the shadow geo ourselves in the shadowcaster pass. But I stopped writing shaders in Unity in a serious manner back in Unity 4x so YMMV
     
  4. ciapoide121

    ciapoide121

    Joined:
    Aug 30, 2014
    Posts:
    10
    Thank you hippocoder. Writing shaders myself is beyond my skills -- I also looked in the Asset Store but I could not find anything useful.

    I'd just like to know if what I asked is theoretically possible -- if so, I can hire somebody to do the work. What would you say?

    Thanks a lot!
     
  5. OlegPavlov

    OlegPavlov

    Joined:
    Jun 22, 2014
    Posts:
    8
    It's not that simple.
    Even in Forward Pass shadows projected on a whole screen, and shadow texture destroys after that.
    So you have to copy and store shadow texture to be able to write your own shadow receiver.

    Or you can create another screen buffer in order to store shadow offsets, so you can rewrite unity shadow projecting shader.

    Or the better variant is to achieve your goal with geometry and point of view.
     
unityunity