File Exchange

image thumbnail

Patch Software Render

version 1.0 (56.8 KB) by

Patch Software Render with Phong-shading, shadows and textures



View License

These files features a complete software render pipeline from Triangulated Mesh to Fragments. Like the OpenGL software renderer, but without using any external libraries, and far less code. The renderer renders to a Matlab image, instead of the computer screen.

The render pipeline is written in c++ code, and supports, Phong shading, Color interpolation, Textures.

Also there is c++ code for calculation of Shadow Volumes, which can be used for self shadowing, and other real shadow effects.

The pipeline and all commandos are like in OpenGL, thus you can use the OpenGL documentation for things like your blending function and modelmatrix.

This is "version 0", thus there are only a few examples, only limited help available, and probably some bugs.

You need a c++ compiler to compile the code, before running the example. Compile code:
mex renderpatch.cpp -v
mex patchshadowvolume.cpp -v
mex patchnormals_double.c -v

Comments and Ratings (3)

Dirk-Jan Kroon

Dirk-Jan Kroon (view profile)

Note, in this version is the following bug
Line 34 in renderpatch_shading.cpp:
Is a bug, must be:

Gabriel Peyre

Gabriel Peyre (view profile)

Very impressive piece of code.

Tal Darom

Tal Darom (view profile)

Great work.
I have only one comment - I think depth check should be true by default

MATLAB Release
MATLAB 7.10 (R2010a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video