View License

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

» Watch video

Highlights from
Patch Software Render

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 56.8 KB File ID: #27084 Version: 1.0
image thumbnail

Patch Software Render


Dirk-Jan Kroon (view profile)


Patch Software Render with Phong-shading, shadows and textures

| Watch this File

File Information

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


This file inspired Local Depth Sift And Scale Invariant Spin Image Local Features For 3 D Meshes.

MATLAB release MATLAB 7.10 (R2010a)
Other requirements C++ Compiler
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
21 Feb 2014 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:

Comment only
21 Mar 2012 Gabriel Peyre

Gabriel Peyre (view profile)

Very impressive piece of code.

25 Jul 2010 Tal Darom

Tal Darom (view profile)

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

Contact us