- Home /
Stop Billboard Texture Rotation in Triplanar Shader
Hello all!
I'm working on creating a new type of billboard shader that I haven't been able to find examples of.
Essentially, I want to create a sort of tri-planar (oriented to object space) billboard shader for a cloud system. This should help keep the illusion that the billboard is a cloud while rotating around it. I started with the shader here: http://en.wikibooks.org/wiki/Cg_Programming/Unity/Billboards and modified it to support additional sides. This part works, but I'm having issues when rotating around the axis of view.
Ie. When looking at the texture from the "Z" direction and rotating the billboard quad around "Z" the texture stays in place on the screen. This is also evident when looking "up" or "down" from the quad and rotating the camera around the "Y" axis. Obviously, this will break the illusion as well.
I tried a few different techniques to try and alter the texcoords to counter the Projection-Model rotation, but so far I haven't been able to find anything to get rid of it.
If needed I'll be posting the tri-planar shader later along with my attempts to counter the texture orientation.