Search Unity

You can no longer override the grass shader for terrain?

Discussion in 'General Graphics' started by astracat111, Oct 13, 2019.

  1. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    Taking some tips from years back, it seems like you could override the grass shader by simply downloading the appropriate built-in shaders then changing lines. Now I've seen a recent thread where people are having trouble doing this, you import the built-in shader and it doesn't override it.

    Is there a way in where the built in shaders can still be overridden?
     
  2. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    I'm guessing that was my post you saw, I haven't been able to solve this oof its very frustrating
     
    astracat111 likes this.
  3. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    For me it really is as well, I have no way of making my own grass thats as fast as the terrain grass.

    Its not until this moment that I realize how slow gameobjects actually are in comparison.
     
    richardkettlewell likes this.
  4. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    Indeed, it's crazy that no one at Unity has replied to any of these posts. It feels like we're just screwed
     
  5. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    If we broke something, report it as a bug as we will look at fixing it
     
  6. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    Alright, will do. @joshcamas Are you going to report it first? I can support the bug report you put up, otherwise I'll get to it as soon as I can.
     
    joshcamas and richardkettlewell like this.
  7. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    Sure, I'll put the bug report up tomorrow and link it here
     
    richardkettlewell likes this.
  8. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,266
    I think the "hack" was "fixed" since Unity 2019.1 since it introduced changes to the shader compiler (with the addition of async shader compilation). This is probably why it's no longer possible.

    Everyone would have more benefit from being able to set the grass/detail shader directly in the terrain settings. Without this, there is currently no way to use custom grass shaders on the terrain.

    The only way to have custom grass is to add the grass prefab as a "tree". But this will mark every tree instance as a navmesh obstacle. Next to trees not being able to align to the terrain, resulting in "floating" grass on slopes. Far from ideal!
     
    astracat111 and MadeFromPolygons like this.
  9. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,278
    I agree that we should be able to plug in override shaders, just like how terrain shaders can be overridden.
     
  10. astracat111

    astracat111

    Joined:
    Sep 21, 2016
    Posts:
    725
    Ah, that's really a shame, it really goes to show how slow gameobjects are in comparison with having grass which is highly optimized with terrain and able to have so many objects on screen at once. I'm actually just considering at this point using the semi-blurred grass, I wanted to get it so that it uses point filtering instead of bilinear. : /

    I'll see if just creating a custom prefab using a customized version of the grass billboard will work.