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. Dismiss Notice

Question Accessing shadow caster positions

Discussion in 'Shader Graph' started by Peter-Bailey, Jun 13, 2021.

  1. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    35
    Is it possible to access the world space positions of shadow casters within shader graph? Or world positions of other game objects in the scene?
     
  2. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    You can always have a C# that manages/reads these world positions and write them to your shader.
     
  3. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    35
    That's what I was thinking, but wasn't sure. Thanks for your response!