Creating a billboarding surface shader


I’ve been trying to create a billboarding surface shader. I know the billboarding needs to occur on the vertex shader level of the whole shader. But I can’t seem to figure out how to set it up. I’ve tried incorporating a lot of things I’ve found on these forums and answers, but no luck whatsoever… Does anyone have any thoughts on this?


Have you looked at the WikiBooks intros to Cg and GLSL for Unity? They have examples of billboarded shaders in both those languages: