Home > Graphics > Triangle Rasterization / Texturing

Triangle Rasterization / Texturing

Triangle rasterization was one of the first great steps I took into understanding partial derivatives and programming graphical algorithms only using integers. Having already done DirectX at the point of making this, I felt like this assignment was pointless. Furthermore, I never really saw the benefit of using integers instead of just using floats since on the PC the performance difference was negligible (seemed like it was just a legacy thing). What really changed my opinion, however, was my VX6900 phone. No form of triangle rasterization existed on the phone, so in order to do any sort of 3D I had to port it myself. Once I ported this I found out something else: how slow floating point can really be on embedded systems. It turned out this served as a great lesson as to why things are done the way they are done.

The below videos include triangle rasterization, Gouraud shading (color interpolation), and texturing. One neat thing I added to my implementation was the concept of shaders (as simple function pointers), which really helped me easily add things like interpolated depth and nearest neighbor texturing.

Categories: Graphics Tags:
  1. No comments yet.
  1. No trackbacks yet.