has anybody done any work on this?
I am considering this:
on xbox - large index buffer containing vertex index pairs
0,1 means compare item 0 with item 1
0,2 etc.
0,3 no duplicates
1,2
1,3
2,3
one vertex buffer containing: world position, radius, objectid
then render to mip mapped texture with 1 pixel per comparison
if collision then render index# (packed) to pixel color otherwise (0, 0, 0, 0)
then using layers of mip map as fast index to find collision pairs
if top layer is black - no collisions
if top layer is grey - go to next layer and check
this should allow 1 collision in 1,000,000 pairs to be found in only 20 pixel reads from the texture
idea for solving gpu stall on readback:
render to three textures in a cycle - read back texture 3 frames late just before start of new frame
do not re-use vertexbuffer slot for 3 frames - ignore duplicate collisions
this also works for me as I have alot of particles whose positions are calculated from formulas
based on elapsed time - the cpu has no idea where they are and does not care until they collide
(although it can perform the same calculation as the gpu to find out)