Search Unity

Apply colors directly to top/left/right surface

Discussion in 'Shaders' started by sniffle63, Aug 21, 2016.

  1. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Im pretty sure this is easy but im new to writing shaders and im not sure how to detect which direction the section of object being rendered is facing based off the view direction.

    So all im trying to do is apply a specific color tint to each side of the object. My camera only moves left, right, up and down, no rotation. So i feel like it would be easy to tint the object based off its current direction to the camera.
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
  3. sniffle63

    sniffle63

    Joined:
    Aug 31, 2013
    Posts:
    365
    Thanks alot! That post has such good info for a noob to shaders like me haha