My fluid-sprite collision detection is slow because of glReadPixels
gamedev.net
In my latest game prototype, I am using the following process per frame:generateFluidStampCollisionsDamage()-render collision data using the detectCollisionProgram-read the contents of the texture on the CPU using glReadPixels-for each collision point in that texture that has non-zero alpha, see which stamp(s) are at that locationprocessCollectedBlackeningPoints- blackens thingsAs you can see, step 1b calls glReadPixe
0 Comments ·0 Shares ·15 Views