Skip to main content
GameDev.net gamedev.net
🔒 Locked

Point Sprites

Started by alexgsmith Jan 27, 2006 at 3:01 PM 3 replies 1k views
Original Post
alexgsmith
alexgsmith
Hi there I'm having trouble with my particle system. I've been using the GL_ARB_point_sprite functions to incorporate point sprites in my particle system, but have noticed the points are all of a fixed size, no matter what size I use for glPointSize. Googling around I also noticed there's a GL_EXT_point_parameters extension which appears to cover similar, if not the same things. Is there some overlap between the two or am I missing something? Do I need to use the GL_EXT_point_parameters instead/as well as the GL_ARB_point_sprite routines? Thanks
Trienco
Trienco
Did you keep in mind that there is a maximum size for points/point sprites which can make them rather useless for many applications? The other problem is that clipping is based on the center, ie if half of the sprite is off screen it will disappear completely.
f@dzhttp://festini.device-zero.de
Eric Lengyel
Eric Lengyel
Fortunately, neither Nvidia or ATI clamps the point sprite size under OpenGL to anything smaller than 4096. (Actually, if you fall into an unaccelerated case on NV, the software path clamps the size, but they told me that they would clean up that asymmetry.) Unfortunately, the ATI driver clips the point centers to the view frustum as the OpenGL spec requires. And even worse, this clipping happens in software. The Nvidia drivers don't clip point sprites (at least in the fully accelerated path). I wish the silly point clipping would get removed from the spec somehow (maybe a new enable) -- I can't imagine why anyone would want that behavior.
markr
markr
Yes you can use point parameters to make them change size too.

BUT there are still significant problems with point sprites. The most major one for me, is that there's no way to specify texture coordinates, so if you have a sprite sheet (VERY common especially for things like smoke, explosions), you can't draw them without state changes.

Probably better is to just bite the bullet and draw billboards, it will get you out of loads of trouble.

The argument "I can't be arsed to do the maths to calculate the billboard vertex coords" is a rather weak one in favour of point sprites :)

Mark

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.