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

Get the UV based on the space of object on screen

Discussion in 'Shaders' started by VortexStudios, Jan 23, 2015.

  1. VortexStudios

    VortexStudios

    Joined:
    Jul 16, 2012
    Posts:
    84


    Look the picture, when you use the screenPos you get the full screen UV scale, but what I'm looking is a way to get the UV only from the space occupied by the object on the screen (the pink square).

    Anyone have any idea how can I do that?? I think I need to screen something for this...
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    screen space texture coordinate generation?
     
  3. VortexStudios

    VortexStudios

    Joined:
    Jul 16, 2012
    Posts:
    84
    what is that?? xD
     
  4. VortexStudios

    VortexStudios

    Joined:
    Jul 16, 2012
    Posts:
    84