yep its still slow even with limiting the number of traces and doing block pixel setting ( took 3-4 seconds at 640x480 with that image above.)

but thats all i did, was base color shade on the traced distance


vec_set(temp.x, vector(xx, yy, 10000));
vec_for_screen(temp.x, camera);

trace_hit = c_trace(camera.x, temp.x,ignore_me);
if (trace_hit !=0)
{
i = int((1-trace_hit/10000)*255);
vec_set(color,vector(i,i,i));

then just translate that color vector to a pixel and plot it back onto the image

I think shaders could do this faster as you can grab everything in the render view with one shot. but i don't know shaders to do such a thing myself.

it would be possible via dll or scripting, but you'd have to use an example of OLD 3D rendering to pull it off. a single line of traces , then vector math calculations to set where evrything is and its hight. then blit the data into the image all at one time vs the pixel by pixel drawing method.


Last edited by Grimber; 06/28/05 12:52.