PDA

View Full Version : Point Sprites & AMD



Nowhere-01
05-30-2011, 04:54 AM
Hey, i'm searching for more recent info about gl_point_sprite support with AMD/ATI cards... Is it still broken under windows?

I've seen few older posts on forums claiming there are tex.coord problems.

Alfonse Reinheart
05-30-2011, 09:30 AM
Do you have a link to those posts? In what way was it broken?

Nowhere-01
05-30-2011, 09:50 AM
http://www.gamedev.net/topic/525643-point-sprites-on-windowsati/

http://forums.amd.com/forum/messageview.cfm?catid=392&threadid=129431 (multiple questions, seems like second one with code sample is unresolved or resolution unreported).

https://bugzilla.mozilla.org/show_bug.cgi?format=multiple&id=602183

Main reason i'm afraid to waste time on this extension is 1st link. There's one obviously not-a-noob and a developer team couldn't get it to work properly. But it was 2009.

DarkGKnight
05-31-2011, 04:17 AM
The point sprites sample here (http://www.codesampler.com/oglsrc/oglsrc_6.htm#ogl_point_sprites) works fine on my Radeon HD 5500 series card using the latest drivers (Cat. 11.5b).

Nowhere-01
05-31-2011, 05:54 AM
Thank you for letting know. Hope i'll get more positive responses. Sorry for offtopic, but i have one more question about point sprites:

I don't need to sort them myself to avoid clipping each other, right?

I did my own implementation for particles(just textured quads), but they aren't billboard, because i have no idea how to sort them _fast_ relatively to camera. Look good(made them very customizable), but without billboarding they're halfa$$. And they kinda work for my current project, but for future, i want something better and faster.

malexander
05-31-2011, 06:57 AM
I don't need to sort them myself to avoid clipping each other, right?
That depends on whether your sprites are cutouts (alpha 0 or 1) or transparent. If they're cutouts, you can draw them normally using the Z buffer. If they're partially transparent, then you'll need to depth-sort them on the CPU and draw them back-to-front, or use a limited number of depth-peel passes to achieve the desired look. The number of passes will depend on the opacity of the sprites (more opaque sprites will require fewer passes than nearly transparent sprites in order to look correct). Depth sorting on the CPU is acceptable if you have a small number of sprites (<100,000 say), otherwise you'll probably need to depth peel.

Nowhere-01
05-31-2011, 08:47 AM
Thanks, i'm not gonna use point(less) sprites then. Gonna adopt a better sorting algorithm(my is n^2, thats why i have problems getting it real-time). Also not sure how to express camera position affect on particle order certainly(with billboarding enabled).