|
![](/i/fill.gif) |
> OK, so for anybody who knows about such things... Would it be feasible to
> render an Iterated Function System image using a GPU? And would it be any
> faster than using the CPU?
See attached image. That spike in the right CPU chart was where I started
the program.
I'm using the standard fern algorithm that's on the wikipedia page about
IFS.
Speed: 23.2 million iterations per second (512x512 points in parallel per
frame at 88 fps)
This is on an nVidia FX1700, if I get time I'll try it on my FX7900 tonight,
should be significantly faster.
I don't know how this compares to how fast a CPU would be, if I get time
later I will try out the same on the CPU for comparison.
The hardest bit was actually getting a good random number generator inside
the pixel shader. What I ended up doing was to generate a big texture full
of random numbers at the start of the code, then in the pixel shader it
generates an xy coord based on a number of things and looks up the value in
the random texture at that position. Seems to work well, because believe
me, if your random number generator is just a little bit wonky, the fern
doesn't look very nice at all!
Post a reply to this message
Attachments:
Download 'image1.jpg' (99 KB)
Preview of image 'image1.jpg'
![image1.jpg](/povray.off-topic/attachment/%3C48870f27%40news.povray.org%3E/image1.jpg?preview=1)
|
![](/i/fill.gif) |