- Home /
How to make a billboard shader?
Hi!
For the past few days, I've been trying to find any information on how to make a billboard shader. I've searched Unity Forums and Unity Answers as well, but all the answers either suggest using scripts to rotate planes (which is a bad idea) or following this tutorial (which doesn't work for me at all).
I don't know anything about shaders and how to write them. All I need is a shader that will force a plane with a texture to always face the camera. I need this for my custom grass and flowers. So, if anyone knows where to find or how to make a billboard shader, please let me know. I'll appreciate any help.
Thank you!
Anyone...? At least suggest a good tutorial that works (not like the one I mentioned above).
Perhaps if you explained why you had problems following the tutorial code it would be easier to help you.
Hi, @tanoshimi. When I apply that shader to an object, the object becomes invisible. Time to time it appears if I look at it from a certain angle, but then it disappears again. I tried changing values that they mention (for planes or for cubes), but that didn't help at all. Also, from the link that @AR_Rizvi has provided, I can see that others are having issues with that 'tutorial' too.
That sounds like you've got dynamic batching enabled, which will obviously break per-mesh billboarding as already pointed out in that thread.
@tanoshimi, my grass is not too dense and right now it doesn't affect performance at all. However, I still want to add LOD level with a bilboard version. This will be more useful for my flowers than for the grass.
Answer by AR_Rizvi · Feb 03, 2017 at 07:08 AM
Here are some very useful links this would help
I think that Billboard Shader Pack is not compatible with Unity 5+