I wanted to try this since a long time:
The scenery polygons are rendered as a list of line segment for every line of the screen. { { x, z, color }, { x, z, color }, ... }
No need to sort anything because polygons are inserted in every line raster with z test (making previous segments moved or deleted inside every lines)
it takes less than 0.3 of the frame to draw this frame rasterized buffer even if it is quite complex.
Then dynamic model polygons are drawn on the top of it with z test.
I'm quite happy with the result, now I need to try more complex models...
This is just a demo yet. (It still has annoying bugs)
Hi FRedShift,
This is incredible. So you essentially pre-render the scenery and store the Z values for each pixel (or each line of pixels) and then you use this to mask the dynamic polygons that are in front of it? (And I realize that I just paraphrased your description completely...) Very very cool.
Hi electricgryphon, more precisely, not each pixel got a z but a segment of same color pixels (it is not completly accurate then) and drawing the buffer on screen would be very long. if you press C and up/down you can see my debug line showing the content of one line. a list of horizontal segments.
[Please log in to post a comment]