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

Animated Font

Discussion in 'Shaders' started by meh11, May 24, 2012.

  1. meh11

    meh11

    Joined:
    Dec 1, 2009
    Posts:
    15
    .
     

    Attached Files:

    Last edited: Oct 24, 2014
  2. bricevdm

    bricevdm

    Joined:
    Nov 4, 2009
    Posts:
    34
    nice :)

    You'd probably gain performances by avoiding the conditional branching. I'm not sure why you use two channels. you could use a single gradient, tighten the range with a multiplication and offset the values by your _Amount. Saturate() and voila, you'd even have a nice anti-aliasing for free :)

    i guess you know this one http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf
    not the subject but close
     
  3. bricevdm

    bricevdm

    Joined:
    Nov 4, 2009
    Posts:
    34
    I'm pretty sure you are not bound by the precision of the texture itself (8bits), but rather the precision of interpolators (probably half or float).
    You could use a highres uncompressed texture for the mask (inside/outside the letters), such as alpha8, and then use a lower res texture as a gradient source. The bilinear filtering and the interpolators should do the rest.

    Nice stuff anyway, thanks for sharing :)