The code is available under the GNU license.
It is using the autotools, so it compiles and runs cleanly under most
platforms (tested so far on Linux/x86, Mac OS/X, Windows (using MinGW gcc),
OpenBSD/amd64 and FreeBSD/amd64).

Unlike the corresponding pure-software implementation,
these sources use OpenGL
to do the rendering. In fact, they use fragment shaders and Vertex
Buffer Objects (VBO) to perform all the graphics calculations in hardware
(if supported by your card). A 70$ graphics card (an ATI 4670) provides around
100 million phong shaded triangles per second with this renderer.

Load it up in shadevis and hit ENTER
to have shadevis calculate the ambient occlusion factors per vertex. After that,
hit 'D' as many times as necessary to lower the diffuse light to 0%, and hit 'a'
to pump up the ambient to 100%. Hit 'S' to save the object.

Notice that the Phong shading mode is real phong shading, done through
the vertex and fragment shaders. The vertexes' normal vectors are
interpolated per-pixel, and the complete lighting equation is then
evaluated. To improve the areas not touched by the light source
(the ambient ones), the shaders also interpolate the per-vertex ambient
occlusion factor that shadevis
generates, thus creating radiosity-look-alike renderings.

Since my renderer uses shaders and vertex buffer objects, rendering
speed is amazing: my Radeon 4670 draws a huge object I have
(1.6 million triangles) at 86 frames per second, for an unbelievable
134 million phong-shaded triangles per second!

And just look at the difference between gouraud and phong shading...

Phong shading creates much better pictures than Gouraud; especially
at low tessellations.Notice how the fragment shader creates Phong higlights,
and also how itinterpolates the vertex ambient occlusion factor per-pixel.

The comments on this website require the use of JavaScript. Perhaps your browser isn't
JavaScript capable or the script is not being run for another reason. If you're
interested in reading the comments or leaving a comment behind please try again with a
different browser or from a different connection.