Render Time Boolean

Is there a way to do a rendertime boolean with some crazy GLSL shader techniques?

Its a pretty interesting technique I have seen in the past in several other render engines make use of -Renderman, Vray, Mantra etc.

Here is an example of the application in Vray using their distance tex:

youtube.com/watch?v=n0gpeBZYubU
therenderblog.com/render-time-pe … stancetex/

eetu has one in Houdini that counts the intersections from a “Ray” direction from camera position. If an odd number of ray hits, we are inside the object boolean, if even we are outside the boolean.
sidefx.com/forum/topic/31575/

I’m not totally concerned with a fully “real-time” application, just something that is relatively fast (5-15 FPS) but my geometry is WAY too slow to do in SOPS!