Skip to main content
gamedev.net
🔒 Locked

point sprites

Started by dawidjoubert 4 replies 600+ views
Original Post
dawidjoubert
dawidjoubert
who can tell me how to use point sprites
----------------------------http://djoubert.co.uk
_the_phantom_
_the_phantom_
or there is ARB_point_sprite which is the standard version.

CodeSampler have a couple of point sprite programs on their site.

Note: currently on ATI cards point sprites are pretty broken, as soon as you start drawing with them (glbegin for example) it mucks up the texturing on other objects in the scene. Finaly managed to get the attension of someone at ATI to fix it and apprently he's going to 'make sure the right people see the problem' (instead of the apprent smoke screen which is devrel), so it might get fixed in a couple of driver revisions. there are also reports of it crashing and locking up systems when used with Vertex Arrays and/or VBOs.
Yes, currently this extension is FUBAR [cry]
Ademan555
Ademan555
Is there any speed(in the nvidia drivers or the soon to come "fixed" ATI drivers)/any other reason to use this extension over billboarded quads?(or triangle strip) I can't imagine theres any advantage other than it being a little higher level
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out hi
Trienco
Trienco
Quote:
Original post by Ademan555
Is there any speed(in the nvidia drivers or the soon to come "fixed" ATI drivers)/any other reason to use this extension over billboarded quads?(or triangle strip) I can't imagine theres any advantage other than it being a little higher level
-Dan


you mean except saving a lot of work because you dont have to orient a gazillion billboards to face the cam, transform one instead of four vertices and being about twice as fast as doing the same in a hand written vertex shader/program?

not really, in return you get bad clipping and cant "rotate" the sprites. not to mention that i expect to find out who the president after the next one will be, long before ati will get around to have completely working point sprite support.
f@dzhttp://festini.device-zero.de
vincoof
vincoof
You save a lot of bandwith when specifying the point sprite.
Basically for each call to glVertex with ARB_point_sprite you need an equivalent of four calls to glVertex and four calls to glTexCoord (you could save this with texgen but this is even slower) with billboarded particles, not to mention the hassle (and speed drop) of setting up a matrix that faces the camera. The only problem that comes to mind is that point sprites are clipped when the center exceeds the border of the screen, but you can even handle that with an appropriate VP (telling to fade the particle when approaching the border) and anyway it's only a problem if your particles are big and if your particle count is low.

Topic Locked

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

Sign in to reply to this topic.