Title: GLSL based GPU raytracer Post by: cbuchner1 on June 06, 2010, 12:44:39 AM Here is a C++ and GLSL based raytracer that is entirely open source that I just found by chance (a chance named Google).
http://github.com/vain/GPUTracer It uses a fairly flexible approach with pluggable formulas for objects, such as the Mandelbulb, Quaternion Julia Sets, etc. It is really a good learning tool and a basis for your own experiments, if you intend to experiment with GPU programming using a cross-platform and C-like high level shader language. The raymarching is a bit primitive (initial fixed step size, plus final bisection). I don't think it uses advanced mechanisms yet, such as a distance estimate. The code uses the SCons build environment and is under GPL. It was developed by Peter Hofmann. It uses the GLUT library to manage its OpenGL window. To get the sourcecode you need a tool called "git" (TortoiseGit may work on Windows if you prefer a graphical interface) to get the source code, this this did the trick for me: git clone http://github.com/vain/GPUTracer then build this software by calling scons inside the GPUTracer directory like this: scons and to run the program displaying a Mandelbulb ./run.sh I tested this software under Linux only. I believe since he uses the GNU cpp preprocessor to assemble his final .glsl code, it will require the gcc compiler to be present on your target system (i.e. XCode on Mac, MinGW on Windows). The start script was written for a Unix shell, but will likely also run on MinGW. Find a German language tutorial about this software here: http://www.uninformativ.de/?ndo=single&newsid=108 Peter Hofmann has a DeviantArt page: http://n-to-infty.deviantart.com/gallery/ Christian Title: Re: GLSL based GPU raytracer Post by: subblue on June 07, 2010, 02:21:44 PM Interesting find. Will have to see if I can get it compiled on my Mac
Title: Re: GLSL based GPU raytracer Post by: visual.bermarte on April 28, 2011, 07:04:56 PM works fine under OSX: change (inside GPUTracer.cpp) '#include <GL/glut.h>' like that '#include <GLUT/glut.h>' remove '-march=native', '-mtune=native' from SConstruct there's also something else to remove..(see terminal's output..can't remember it now) and from terminal just add this at the end: g++ -o tracer GPUTracer.o Viewport.o -L. -framework OpenGL -framework Glut -lVecMath compile it again |