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

What's the Best Toon Style Grass Shader?

Discussion in 'General Discussion' started by jonkuze, Oct 15, 2014.

  1. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    Does anyone know of an awesome Grass Shader that works best for Toon Style Grass Textures?

    For example I have this problem with my Grass where all my Grass looks Aliased (sharp edges) even though I have 8x Anti Alias Turn On. Currently using Transparent > Cutout > Diffuse Double Sided Shader. Note: Playing with the Alpha Cutoff doesn't help... -_-

    I want to Keep the Double Side, Only I can't find a good Shader that has Double Sides and Makes the Grass looks ultra smooth...

    Any Tips?

    grassshader.png
     
    AndrewGrayGames likes this.
  2. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    Use an alphablended shader instead of cutout, then you can control smoothness by alpha falloff.
     
    Deon-Cadme likes this.
  3. Deon-Cadme

    Deon-Cadme

    Joined:
    Sep 10, 2013
    Posts:
    288
    Nice looking game :)

    A bit off from the question but... Just wanted to say that my first impression of the screenshot was that the grass has to much detail compared to all the objects in its surroundings. Everything else seems to use bigger, bolder shapes in their textures.
     
  4. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    hmmm is there one that I can get off the asset store or elsewhere? or does it need to be custom coded?
     
  5. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    Thanks for the feedback and observation, you might be right... i'll keep it as is for now, but i'll definitly keep that in mind for sure.
     
  6. Mistale

    Mistale

    Joined:
    Apr 18, 2012
    Posts:
    173
    They're built in, but not named after the technique they use (alphablending). Just use Transparent diffuse for example.
    The key difference is that cutout shaders don't allow semitransparent areas, just on/off.

    Manipulate the alpha channel of your texture to have a smooth ramp at the edges of the grass, and you'll get antialiasing.
    As always, transparent objects are rendered in full, even fully transparent areas. So its probably good to use meshes that conforms somewhat with the shape of the grass instead of using textured quads, to avoid a lot of overdraw from overlapping objects.

    Look here for more info: http://docs.unity3d.com/Manual/shader-TransparentFamily.html
     
  7. jonkuze

    jonkuze

    Joined:
    Aug 19, 2012
    Posts:
    1,685
    Wow OK, I'll have to give this all a try! Thank you so much for your Tips!! It's really much appreciated! I'll let you know how it goes. ^_^