Search Unity

Color Hue Based on World Position

Discussion in 'Shaders' started by ronjart, Jan 11, 2017.

  1. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    I'm new to shaders and was wondering if it is possible to make a shader that shifts the color hue based on its world position. I got to a point where each pixel would be colored based on its world position, but I'm looking for a way to have a uniform color not a gradient. I other words a shader that produces a uniform color across the object with a hue based on world position (or any other random attribute for that mater)

    Any help is appreciated!
     
  2. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,461
  3. ronjart

    ronjart

    Joined:
    May 16, 2013
    Posts:
    101
    Amazing, thank you for the help!