DShade - a 3d software rasterizer

janderson askme at me.com
Fri Jan 18 23:52:10 PST 2008


Tom S wrote:
> Heya! I've written a short note about a 3d software rasterizer I've 
> programmed in D some time ago as a final project for my "Graphics and 
> Multimedia" course. You can read about it on my freshly created devlog: 
> http://h3.team0xf.com/devlog/?p=5
> 
> Sorry for not posting about it before; I've had weird issues with DShade 
> crashing, but they have magically disappeared with the recent DMD and 
> Phobos ( so I'll pretend the issues don't exist anymore :P ).
> 
> Cheers!
> 

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.

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.

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.

Oh, another probably obvious: make sure your not doing any allocation 
during the real time part of the game.

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

Anyway, nice work.



More information about the Digitalmars-d-announce mailing list