Billboard shader without distortion
- by Nick Wiggill
I use the standard approach to billboarding within Unity that is OK, but not ideal: transform.LookAt(camera).
The problem is that this introduces distortion toward the edges of the viewport, especially as the field of view angle grows larger. This is unlike the perfect billboarding you'd see in eg. Doom when seeing an enemy from any angle and irrespective of where they are located in screen space.
Obviously, there are ways to blit an image directly to the viewport, centred around a single vertex, but I'm not hot on shaders.
Does anyone have any samples of this approach (GLSL if possible), or any suggestions as to why it isn't typically done this way (vs. the aforementioned quad transformation method)?
EDIT: I was confused, thanks Nathan for the heads up. Of course, Causing the quads to look at the camera does not cause them to be parallel to the view plane -- which is what I need.