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

Question Grandient following the object shape

Discussion in 'Shader Graph' started by tyronleo, May 18, 2020.

  1. tyronleo

    tyronleo

    Joined:
    Apr 28, 2018
    Posts:
    4
    Hi everybody,

    I'm learning unity and I'm very new to shaders. I'm doing a lot of tutorials and already did some things, but I have a problem that I'm not able to solve.
    The problem I have is that I want (if it's possible) to make a gradient (or a texture, material, etc.) follow the object shape. I have a cilinder where I can control the position of the gradient, the spread, etc. But when the object have some curves it fills like this:
    have.png
    But I what that the grandient in this case, takes the shape of the object, filling like this:
    want.png
    It's that possible? How? Have this a correct name to search for? (I'm sorry, English is not my mother tongue).

    This is the current shader graph I'm using:
    shader.png

    Thanks in advance, any help is appreciated.
     
  2. tyronleo

    tyronleo

    Joined:
    Apr 28, 2018
    Posts:
    4
    Is there any way to make that? With or without shader graph. I need to be able to fill based on the object shape but cannot find anything like this.