depth clipping raytraced imposters.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Dec 10, 2012 at 14:11

Ive got this qdm (quadtree raytracing) implementation that works on 6 displacement maps (one for each face direction) inside a bounding box. (with instancing)
I could instance as many bounding boxes as id want, (as they are only 8 points each) and raytrace the insides, only problem is - you cant have them penetrating each other because there is no way to detect inner intersections as they are all raytraced independantly.

Is there any way around this problem? or is it just simply impossible.

3 Replies

Please log in or register to post a reply.

Fd80f81596aa1cf809ceb1c2077e190b
0
rouncer 103 Dec 10, 2012 at 14:19

hmm, I kinda thought of a solution, you have to draw the overlapped boxes after each other in separate passes… hmm, maybe you can do it.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Dec 10, 2012 at 17:59

If your pixel shader outputs a depth value in addition to a color, then depth testing should clean up the intersecting objects, just like it does with plain old polygons.

6eaf0e08fe36b2c23ca096562dd7a8b7
0
__________Smile_ 101 Dec 10, 2012 at 20:55

In my instancing raytracer I keep sorted list of events where current ray hits bounding boxes (4-8 items). When do I detect intersection with solid geometry I check that list and if there are bounding geometry before intersection I’d continue tracing.