Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


GPU Sort for Small List


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Quat   Members   -  Reputation: 422

Like
0Likes
Like

Posted 08 March 2013 - 07:49 PM

I recently looked into GPU sorting algorithms as part of my goal for a compute GPU particle system.  I studied bitonic sort and the DXSDK implementation.  This looks good when I need to sort a lot of particles, but there is one case I have where I need sorted particles the list is relatively small < 100.  It is for fire, where I use video textures stored in a volume map and therefore do not need a lot of particles to get good results. 

 

I'm sure I can modify the bitonic sort to handle particle counts less than the thread group size.  But I'm wondering if I should just do a more bruteforce sort like brick sort (http://en.wikipedia.org/wiki/Odd%E2%80%93even_sort).

 

In either case, I'm not expecting huge gains from GPU implementation since the particle count will only run on one thread group in this particular case.  The goal is just to avoid CPU intervention. 


-----Quat

Sponsor:

#2 Adam_42   Crossbones+   -  Reputation: 2619

Like
0Likes
Like

Posted 09 March 2013 - 06:34 AM

Don't forget that not all particle systems need sorting to render correctly. Anything that gets drawn with additive blending will look correct regardless of which order the particles are rendered in. In my experience you can usually do that for a fire.

 

For sorting 100 objects I wouldn't worry too much about what sort algorithm you use, with so few items it'll be quick enough with almost any algorithm.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS