Is there any example on the Internet how conflict detection can be implemented using shaders?

Is there an example of OpenGL, OpenGL ES, or WebGL code on the Internet how 3D Collision Detection can be implemented using shaders (preferably GLSL)?

Thank.

+5
source share
1 answer

GLGE has collision detection based on shaders. See this demo . (WASD, spacebar and mouse to move. Pay attention to how you encounter walls, etc.)

If you look at the source code, collision detection is handled by code

var ray=gameScene.ray(origin,[0,0,1]);

glge.js, , GLGE.RENDER_PICK (, , pkfragStr).

+3

All Articles