DShade - a 3d software rasterizer

janderson askme at me.com
Sat Jan 19 08:53:35 PST 2008


Tom S wrote:
 > janderson wrote:
 >> This is some nice work.  It seems to run a little slow.  I assume 
this is software rendered so I guess performance is reasonable for that.
 >
 > It's a very basic renderer, with not many optimizations, but I 
believe it's not very slow either, at least for something not using any 
SIMD instructions and done in about two weeks.
 >
 >
 >> Anyway I'm not trying to be picky, but if you don't mind here are 
some optimisation suggestions.  I couldn't look over all your code so I 
may have missed something.
 >
 > I don't mind, thanks :)
 >
 >
 >> Are you using the PVS data stored in the tree to speed things up?
 >>
 >> Are you sorting closest to furthest so that you can early out in 
your z-tests (the BSP tree almost does this for you).
 >>
 >> Another thing you could do is a software occlusion test using the 
bounding boxes of the BSP nodes.
 >
 > Unfortunately nope, I didn't have enough time to do that. I guess 
I'll add this stuff when I'm bored (and find some spare time) ... I 
actually wanted DShade to do span-based rendering like in the old times. 
That would provide pretty decent occlussion testing, but... reality struck.

That's a good idea.

 > I failed the 'Abstract Algebra' exam and had to study to take it 
again, thus shrinking my predicted time budget :F
 >

Hay, I completely understand.  It looks like you've already put a huge 
amount of time into this engine.

 >
 >> Oh, another probably obvious: make sure your not doing any 
allocation during the real time part of the game.
 >
 > Sure thing :) I only use the GC for top-level objects, malloc 
elsewhere, there's some pooling going on under the hood as well.
 >
 >
 >> My thesis may be helpful.  The engine was in D, however it uses 
hardware rendering and doesn't look half as cool as yours.
 >>
 >> http://www.gamasutra.com/features/20060417/anderson_01.shtml
 >
 > I've actually had it on my HDD for a while. Hard not to notice a 
gamasutra feature by a fellow D (game) programmer, especially when it 
touches BSP trees ( when every other kid was playing with early hardware 
shaders, I stuck my nose in automatic portal generation ). Your thesis 
may come in handy when we restart the work on Deadlock :)
 >

Nice to know its using someones MBs :)   If you do decide to use it, 
feel free to email me any questions you have.  I think you may already 
have my email however here it is again: its hohums on google's email.

-Joel



More information about the Digitalmars-d-announce mailing list