|
![](/i/fill.gif) |
Warp wrote:
> From the little I know, Pixel Shader Model 3 supports branching and
> looping, so I assume it might be possible to create a pixel shader which
> colors pixels according to an iterated function system.
>
> However, if I'm not completely mistaken, pixel shaders are calculated
> on a specific pixel and cannot re-use previous calculations from other
> pixels which have been calculated with a pixel shader (because else it
> would make parallelizing pixel shaders extremely difficult, if not
> impossible). Thus you are limited to making a pixel shader routine
> which is calculated on a per-pixel basis, without input from other
> pixels.
> I assume that this means that you cannot create a pixel shader which
> jumps around the screen and draws pixels here and there, as most IFS
> fractals do. You are limited to calculate on single pixels, like for
> example how the basic Mandelbrot set is calculated.
That seems like a reasonable assessment to me.
I wonder if you could attempt this using the Copy Game rather than the
Chaos Game? That is, start with a white screen, apply each
transformation to it seperately, merge the frame buffers back together,
and then repeat. Do this enough times and the shape on the screen is
guaranteed to converge to the attractor of the system. If you implement
the "merging" state correctly, you can even get density information.
The fatal problem with this method is that it utterly fails if the
entire attractor does not fit on the screen. For attractors involving,
say, infinitely long lines, this method can never work properly.
Also, how about random number generation? Is this "easy" to do on a GPU?
Could you do something like rendering millions of tiny semi-transparent
polygons of roughly 1-pixel size?
Does a GPU provide any way to procedurally render texture bitmaps that
might allow a histogram to be built?
Asside from all that, presumably you'd have to go with some kind of
GPGPU solution such as CUDA. Again, I'm not sure how well the GPU memory
architecture is going to play with that; I haven't looked at the numbers.
> Assuming it is indeed possible to implement some IFS fractals with
> pixel shaders, then it may indeed be much faster than with the CPU.
> That's because modern display cards can run a fair amount of shaders
> in parallel.
This was my feeling...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |