Code Samples

A great example for how I write code these days is my Game Engine’s Entity Component System. You can read the code for it here, or read a blog post explaining how it works here.

Older Samples


Download all Samples

C++, C#, GLSL, HLSL, Unity, OpenGL


Atmospheric Entry Shader

HLSL

Deferred rendering composite shader – with lighting

GLSL

Maze Generator – Complete Program

C++

Mesh Filter building

C++, OpenGL

Navigation Mesh Pathfinding

C++

PID Controller usage

C#, Unity


The next two samples are from my Pathtracer. The topics I programmed are interesting, but the code is not very clean.

I wrote it before knowing a lot about c++ coding standards or the standard library.

Diffuse BRDF – cpu pathtracing

C++

Ray Mesh intersection – with vertex interpolation

C++