Page 1 of 1

rasterization?

Posted: Thu Jun 19, 2014 8:26 am
by AlbusDumbledore
I know youre talking raytracing here but (as i think there are people here who are doing much high efficiency stuff here) i wonder if there would be an option to discuss software cpu rasterization a bit?

I wrote simple soft scanline rasterizer in c and has a speed of about 30ms for 100thousand triangles model (with flat vertex shading) for 500p (500x500) image and about 70 ms for 1000p (1000x1000) for core2duo machine on 1 thread

Search for some hints hoe to speed up - also for some info values how more professional rasterizers are flying here

my code was very strightforward each trangle i just rotate, clip if even one vertex goes rear the view plane (so it is inprecise), scale by 1/z (so it is a bit wrong as far as i heard, thent test if thi is lying in screen rectangle in 2d, if so i rasterize it with scanline, thats all)

- could someone trained in optymizations give some advice? tnx

Re: rasterization?

Posted: Thu Jun 19, 2014 1:42 pm
by toxie
This is a pretty good paper (CUDA though, but still most of the concepts in there apply to CPU, too, incl. source code): https://research.nvidia.com/publication ... ation-gpus