Creating a billboarding surface shader

Hey,

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?

Thanks!

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

http://en.wikibooks.org/wiki/GLSL_Programming/Unity/Billboards

http://en.wikibooks.org/wiki/Cg_Programming/Unity/Billboards