Search Unity

Reveal mask using a shader?

Discussion in 'Shaders' started by xindexer, Feb 12, 2012.

  1. xindexer

    xindexer

    Joined:
    Dec 29, 2011
    Posts:
    9
    My end game is to have a reveal effect for our Logo on start up. Instead of using a video created in AE, I thought that I might be able to achieve the same effect by using a shader.

    The image is our logo with an alpha gradient applied to it

    The shader will reveal the logo over time using the alpha channel as the guide. At time = 0, the logo is hidden, at time=1, the shader lets the background image through where the alpha = 0.01 on the gradient, at time=2, the shader lets the background image through where alpha = 0.02, and so on until time = 100 and the entire image is visible

    So as time progresses, the image is revealed based upon how we build the alpha mask. Radially, wipes, whatever.

    Is this doable?

    Thanks
     
    Last edited: Feb 12, 2012
  2. BIG-BUG

    BIG-BUG

    Joined:
    Mar 29, 2009
    Posts:
    457
    It is doable. In fact, the shaders are already there: Tranparent->Cutout->...
    All you have to do is to modifiy the Alpha Cutoff parameter with your script.
     
    Last edited: Feb 12, 2012
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448