Search Unity

Why is batching disabled in standard Grass Shader?

Discussion in 'Shaders' started by JereHeikura, May 3, 2016.

  1. JereHeikura

    JereHeikura

    Joined:
    May 3, 2016
    Posts:
    5
    Hi!

    I've been trying to make an improved version of the grass shader, and I noticed this line in the shader: "DisableBatching"="True".

    If I change the value to False, the grass will batch. Why is it disabled and will I get any improvements or unfortunate side-effects if I set it to False?

    Thanks in advance!
     
  2. JereHeikura

    JereHeikura

    Joined:
    May 3, 2016
    Posts:
    5
    Shameless bump
     
  3. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
    I had to disable batching in custom billboard shader,
    otherwise the rotation/position went totally broken on them..

    actually the docs mention:
    http://docs.unity3d.com/Manual/SL-SubShaderTags.html
     
  4. JereHeikura

    JereHeikura

    Joined:
    May 3, 2016
    Posts:
    5
    Thank you mgear! I guess it's best to stick with the batching set off.

    Also, any tips for making the grass look more realistic? I've been struggling for weeks trying to make the grass to look not so jagged.
     
  5. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,448
    Please tell me also if you find realistic looking grass.. i would need it also :)
    planning to purchase speed tree desktop grass pack soon, but would prefer more variation than just single plain grass..

    Can you post screenshot how it looks jagged?
     
  6. tawdry

    tawdry

    Joined:
    Sep 3, 2014
    Posts:
    1,357
    What confuses me with the grass is why does it use a individual mesh for each blade. What i mean is if u put an object in a scene and duplicate it as many times as you like it will still only be seen as 1 mesh and only be stored in memory once. But grass treats each as a different mesh which adds up if you are doing a massive grassland area.