Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Question Draw only received shadow.

Discussion in 'Shader Graph' started by lordubik, Oct 13, 2021.

  1. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    138
  2. Sinterklaas

    Sinterklaas

    Joined:
    Jun 6, 2018
    Posts:
    93
    PutridEx likes this.
  3. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    138
    but my trouble is don't draw the mesh that received the shadow... is it possible?
     
  4. lordubik

    lordubik

    Joined:
    Feb 18, 2013
    Posts:
    138
    anybody have an idea? :oops: Thanks!
     
  5. Sinterklaas

    Sinterklaas

    Joined:
    Jun 6, 2018
    Posts:
    93
    Well once you have the amount of shadow attenuation of a pixel, you could for example put that value through a One Minus node, and then put the result in the fragment node's alpha input. This would make all pixels of a mesh transparent, except for the ones that are shadowed.