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

How to gradualy turn a sprite's color to pure Whte?

Discussion in '2D' started by InkaTorque, Feb 21, 2015.

  1. InkaTorque

    InkaTorque

    Joined:
    Sep 4, 2014
    Posts:
    22
    Hi guys , i have been given an assigment at work (I'm doing an internship con a small video game company) , i have to gradualy turn our main character (which is composed of 50+sprites) into a full white silhouette whenever I the player presses a certain button on the keyboard.

    I tried Lerping the current spriteRenderer color to white but doesn's seem to work . I have read that one way of achieving this effect is to use shaders . Is that the only way to achieve that effect?If so : Where can I find good documentation/examples/tutorials about Shader programming in Unity? Will programming a brand new shader that does this little effect be too hard for a guy who has never programmed any shaders at all?I've been reading the Unity documentation on shaders , but there are a lot of things thar are still confusing to me . I hope you can help me.
     
  2. PGJ

    PGJ

    Joined:
    Jan 21, 2014
    Posts:
    897
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Since your doing an assignment while in an internship you should probably go the shader way, but another simple solution is to animate a light to hot white - the light would be setup to only effect the character.
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,936
    Color.Lerp() should work fine, what was the problem?