PDA

View Full Version : fast billboards


reubert
2004.10.07, 06:23 AM
howdy

Does anyone know of a nice fast way to draw a heap of billboards? When I say billboards, they don't need to be "true" billboards. Having them always have up vector as 0.0,1.0,0.0 and all facing the camera plane, rather than the camera point would be fine.

So far I've only been able to figure out ways that involve a multMatrix or loadMatrix call for every billboard. Not only is this an overhead, but it rules out vertex arrays.

I thought I'd almost got there when I came across ARB_point_sprite, but it's not defined in panther :(

David

OneSadCookie
2004.10.07, 07:11 AM
Camera-plane-aligned is the usual meaning of "billboard"; camera-point-aligned looks very strange in the rectangular projections of 3D graphics.

ARB_point_sprite is present on hardware that supports it (GeForce FX+, Radeon 9600+)... but it's ugly, damn-ugly.

The code here: http://onesadcookie.is-a-geek.net/svn/repos/Particles/ draws 'em all in one immediate-mode batch. I'll probably get around to VBO-ing it sooner or later :)

OneSadCookie
2004.10.07, 08:41 AM
update: vbo-ized. Not elegantly (I don't check for the presence of the extension or fall back to CVA or anything, but it's substantially faster than it was :D)