Software Renderer in 28 days

17 comments
10 entries
Advertisement
Clapfoot
October 16, 2008
depth testing woes
The next step was to get depth testing up and running. I had briefly toyed with the idea of doing some sort of triangle sorting, but decided against it in the end for several reasons. First, it wouldn't be practical for my pipeline, which processes one triangle at a time and doesn't rely on having …
916 views
Clapfoot
October 14, 2008
...the long road to rasterization
I've finally found time to implement the first few steps of rasterization.

The first thing I implemented was a triangle fill function. I pretty much just started with the "brute-force" approach, which was basically my own best guess at an implementation. I basically started by sorting the points of …
1,007 views
Clapfoot
September 16, 2008
.. clipping!!!
I haven't had a whole lot of time to work on this lately, but the project is still alive and well!

I finally got around to implement frustum clipping. Specifically, I added clipping in NDC space for its efficiency and code simplicity.

There were several issues I had to overcome for this...

1) I had to…
1,156 views
Clapfoot
September 05, 2008
... projection, perspective, viewport
The next step was to add a perspective projection transformation.

I made the following changes for this:

1) Added a projection matrix in the Renderer class and the following function for generating the matrix:

int SetPerspective(float aFov, float aAspectRatio, float aNear, float aFar);

This function cr…
1,273 views
Clapfoot
September 02, 2008
... view transform
The next step was to add a view transformation to the vertex stage. I decided to go with a right-handed view frame to avoid the extra reflection. I implemented a "LookAt" function to the renderer interface to generate the view matrix and used this to transform each vertex from world to view.

The fo…
958 views
Clapfoot
August 28, 2008
.. world transforms & framebuffer mgmt
The next step was to add world transformations. I added a world matrix to my Renderer class along with added rotate, translate, and scale functions similar to those of OpenGL. When the draw function is called, the world matrix updates the world matrix in the VertexEngine, and the VertexEngine multi…
911 views
Clapfoot
August 26, 2008
Initial class/file organization
...

The next step was to plan out the organization of my project. I wanted my aggregate my project into an application and a graphics library and I wanted to interface to the graphics library to similar to a simplified version of OpenGL. The idea (again not to plan to far ahead) is to be able to wri…
903 views
Clapfoot
August 26, 2008
Starting point...
To put the timeline into perspective, I'll probably be putting on avg 1-2 hours per day on this project, maybe more if my daily schedule permits.

Ok, so I actually starting writing this renderer several days ago and I think i've gotten a faily good starting point.

A few general points on the platfor…
767 views
Clapfoot
August 26, 2008
The plan...
So for the longest time i've been trying to find time to write a software 3d renderer "for fun" and i've finally have the time to start such a project. The main goal of this project will be to solidify my knowledge of fundamental rasterization rendering techniques. Off the top of my head, the basic…
823 views
Advertisement

Popular Blogs

shawnhar
Generalist
101 Entries
9 Followers
15 Entries
10 Followers
johnhattan
Programmer
1,277 Entries
47 Followers
ApochPiQ
Generalist
628 Entries
44 Followers
dgreen02
Generalist
338 Entries
56 Followers
Advertisement