Shader for trees vegetation foliage

Hi,

I need to render simple trees on ios and android devices. I am not using the build in trees for the build in terrain. I tried the build in transparency->cutout shader and alpha blend shader. What I need is:

  • fog should be used
  • alpha blended for better performance on android (and better visual result)
  • correct sorting of leaves
  • nice to have double sided

Currently instead of two intersected planes I made four planes in four gameobjects with one common edge. That fixes the sorting problem. But the alpha blend shader doesn’t respect the fog setting. Does anyonw knows who do do this? I am new to Unity ShaderLab.

A fallback would be to replace the treemodel in the distance by a non-transparent model with a shader which respects the fog settings, Mobile->vertex lit. But this doesn’t fit into our selfmade level-of-detail system so well.

Kind Regards,
Chris

You can check this package. It includes everything you mention (fog, alphablend, sorting, etc) although it’s based on billboards, it’s very fast, so it will work well on Android.

Store Link: Massive Vegetation | 3D Vegetation | Unity Asset Store

Forum: [RELEASED] Massive Vegetation - ultra high performance billboard rendering system

PS: I´m the author, so I´m not imparcial… :slight_smile: