Original Post
I managed to use Occlusion Query to do 2d per pixel collision test on the GPU (ARB_Occlusion_Query). It works really well but now I want to go further. I want to know where on the sprite (it's a 2d app) the collision occured.
Here's an example : Let's imagine a space shuttle inside an horizontal tunnel like this :

I know when the sprite collide with the tunnel, but I don't know if it's the upper side or the lower side who collided...
Any idea ?
Here's an example : Let's imagine a space shuttle inside an horizontal tunnel like this :

I know when the sprite collide with the tunnel, but I don't know if it's the upper side or the lower side who collided...
Any idea ?