Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Replacing built-in shaders for terrain billboard grass.

Discussion in 'Shaders' started by dsedov, Aug 3, 2014.

  1. dsedov

    dsedov

    Joined:
    May 23, 2014
    Posts:
    4
    I've replaced built-in shader for the Billboard grass "Hidden/TerrainEngine/Details/BillboardWavingDoublePass" by naming my shader the same way. Everything works fine inside Unity. When I do a build, however, it does not work. I use custom shaders for everything because of my own lighting model. I have hard time replacing built in grass billboard shader, and desperately need help.

    Also my shader is based on the built-in shader and works fine inside unity, when I hit Play.
     
  2. frogsbo

    frogsbo

    Joined:
    Jan 16, 2014
    Posts:
    79
    there are some shaders to upgrade the grass, and some complete wavy grass systems, it's good to see them, i dunno sorry.
     
  3. dsedov

    dsedov

    Joined:
    May 23, 2014
    Posts:
    4
    Damn... I've tried everything. At first I thought that the shader was not exporting into the player, because it was not assigned to anything. But I've tried that - still no luck.
     
  4. frogsbo

    frogsbo

    Joined:
    Jan 16, 2014
    Posts:
    79
  5. dsedov

    dsedov

    Joined:
    May 23, 2014
    Posts:
    4
    Checked most of them. None use the billboard unfortunately or use billboard with default Unity shader.
     
  6. frogsbo

    frogsbo

    Joined:
    Jan 16, 2014
    Posts:
    79
  7. David L

    David L

    Joined:
    Jul 22, 2013
    Posts:
    11
    When you say it doesn't work, what does the result look like? Eg does it look like the shader is missing?
     
  8. dsedov

    dsedov

    Joined:
    May 23, 2014
    Posts:
    4
    It looks like a default shader. I have a global color map that I use in a shader that samples worldpos and then converts it to UV on the global color map. This way I can have "blue", "green" etc areas that I sample and then multiply the final color with.
     
  9. spraycanmansam

    spraycanmansam

    Joined:
    Nov 22, 2012
    Posts:
    254
    Make sure the shader file is in your Resources folder otherwise a standalone build won't find it. Normally any material using a missing shader would go a lovely shade of pink, but the builtin terrain grass shader will still be present, so it will be defaulting to that.