|
![](/i/fill.gif) |
CShake <cshake+pov### [at] gmail com> wrote:
> Kafka wrote:
> > "PM 2Ring" <nomail@nomail> wrote:
> >> Simple "Mandelbulb" C source code.
> > Here's my humble contribution. The attached archive contains a C++ program that
> > computes the density file for the Mandelbulb, but using the GPU through an
> > OpenGL shader. The OpenGL context is provided by SDL 1.3 (currently still in
> > beta, but already working well).
> >
> Nice. I wanted to play with GPGPU code, but just now finished final
> exams for the semester and didn't find the time.
> Without looking at the code, I have to ask a few questions:
> Can you specify where to zoom in?
No, values (boundaries, max_iters, etc.) are hard-coded in a bunch of constants
at the beginning of the source file. But feel free to change them, or I can
modify the code so that they're given as command-line parameters.
> Is there any noticeable difference due to using single precision, or are
> you using the double registers on the GPU directly (and using 1/10th the
> power of the card)?
I can't use double with OpenCL nor GLSL, as the driver and chipset I have don't
provide that extension. From what I read here and there, using double would
reduce performances by a factor of 5 to 10. That said, most of the time is
acutally spend into writing the file: see the attached code, it displays the
mandelbulb in less than a second (not generating the .df3 file, just displaying
using the shader).
> While I spent a bunch of time on my mbulb df3 generator, I'm probably
> going to move on to the native function patch for the ability to
> arbitrarily transform the surface (and not need to 'render' twice for
> each image)
Regards,
Post a reply to this message
Attachments:
Download 'mandelbulb.tar.gz' (3 KB)
|
![](/i/fill.gif) |