Best way to sort of transparent particles into GPU without CPU using GS pass?

Hi!

Actually, I have a particle system that handles transform feedback to compute entire simulation into GPU,
but now I trying to sort semi-transparent particles.

[QUOTE=martel;1293067]Actually, I have a particle system that handles transform feedback to compute entire simulation into GPU,
but now I trying to sort semi-transparent particles.[/QUOTE]
The best way is to avoid the need to sort them. Additive blending (for particles which emit light but which don’t affect light passing through) and multiplicative blending (for particles which affect light passing through but don’t emit or reflect light) don’t require sorting.

If the particles have to be sorted (because they both affect light passing through and emit or reflect light), you have two main options. One is a topological sort, which only orders particles with respect to other particles which overlap. The other is a total sort, which sorts every particle according to its distance. A topological sort requires less effort overall, but its structure isn’t particularly convenient for vector (GPU-style) parallelism. For a total sort, the most GPU-friendly algorithms are bitonic sort and even-odd merge sort. Both are O(n*log(n)^2), although bitonic sort seems to be more cache-friendly.

Thx! , I have chosen not to carry out sorting, I have given up and I have disabled the depth writing, this make the things more simples …