Real time 3draytracer.

Miscellaneous Forums/Blitz Showcase/Real time 3draytracer.

Yeah, if you remember my omni lightmapper, that does per pixel shadows and doesn't use a single linepick.

What I do there, is sorta like you say, but I render a low-res version of the light pointed at the tri. Then,
Break it down into a objected(Typed) grid, (by reading it per-pixel), pre-light mapping stage. The cool optimization is, since it's objected, you can do like,

if shadowMap\xRow[CheckX]=Null ;No active pixels, stop checking here.
Else if ShadowMap\xRow[CheckX]\yRoy[CheckY] return true
endif

All you have to do is point the camera at the destination and then project it into screen space, and just check the 2d map.

but bringing your idea into it, vivid has a z shader that renders textureless models colored with their Z value, for depth of field, but it could work with this...

But, what worries me is when you actually determine a hit ray(Which can be as a result of a reflection too, so it's not always tied to the camera's pov, but can be recurisive. Not in this demo, but in 'real' tracers)
anyway, is that you need the exact x,y,z location..That is easily done though, could just scale the output into a set region of space(-128,128) then do a shader that colors each pixel encoded with it's 3d location. Do a second one encoded with it's normal...

One quick transfer from the color buffer to system ram should infinitely faster than millions of linepicks.

heh getting carried away, better get back to vivid 'fore I start on this.