Hardware accelerated global illumination

As already mentioned, I added some code to irrEdit and made the radiosity renderer run on the GPU instead on the CPU. My first results were disillusioning: The computed lighting was the same, but the time needed to compute it was the same as well. No speed increase. Hmpf. Then I optimized some parts of the code, minimizing a few render state changes and texture transfers, but the speed increase still wasn't that big at all. Maybe my GPU or the AGP transer was too slow? So I tried it out on my notebook, with some more modern hardware. Here, the speed increase was very noticeable:

irredit global illumination

Computation time for this scene: 9 seconds while something like one minute on the CPU. I also was able to remove some of the artifacts, but as you can see on the edges, some are still remaining. A lot of room for improvements, but I like it already.

nine comments, already:

Did you use Render targets to capture the gpu processed texels?
omaremad () - 10 11 06 - 19:34

Nice :)

Some of the artefacts look like a lack of clamping in the texture addressing mode maybe?

Would still be interested to know which techniques / papers you’ve been referring to for this, there’s a couple of different approaches that I know of and I’d be curious to hear more practical experiences (many of the papers on this subject are seriously light ni the detail on dealing with edge cases etc).
Steve () (link) - 10 11 06 - 21:59

Maybe to solve the artifacts disable all texture filtering as that still contributes to the blur(thats if you use render targets for results capture)
omaremad () - 10 11 06 - 23:59

Shame you can’t speed it up enough to be used in realtime, but I guess that’d be next to impossible without having extremely powerful hardware. Maybe once the GeForce 9 series comes out eh? In the meantime, nice job. ;)
Frobozz - 11 11 06 - 00:10

Most people who do general purpose stuff seem to get a max improvement of 2x to 3x (usually latest Pentium vs. lastest GeForce) after some time of optimization. :-/
There’s only a few cases where people got 10-30x speed improvement. Probably due to bad branching performance/granularity, incoherent texture access patterns, dependent reads, you name it…
who knows - 11 11 06 - 02:02

Wow, that’s impressive! It’s a very nice new feature for irrlicht users! :-D
I hope it won’t take too much time to fix those artifacts.
cmoibenlepro - 11 11 06 - 19:38

looks great! very useful stuff
WhiteNoise () (link) - 12 11 06 - 17:28

wow looks cool. Do you think their will ever be a irrPS2 /irrPlaystation or irrXBOX I just saw irrPSP the other day but I am not a big fun of PSP since I dont own one… Anyways niko irrlicht is just amazing…
leo () (link) - 13 11 06 - 16:07

sure, I’m using renderTargets. I also thought about some texture adressing errors, but it’s not the case, that pixels really get calculated in the wrong color, still I have to look at it :)
No plans from my side to do an irrPS2, but if you have time, just do it :)
niko - 13 11 06 - 17:18

Remember personal info?
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.