Tuesday, November 6, 2012


I implemented following features in the rasterizer:
  • Vertex Shading
  • Primitive Assembly with support for triangle VBOs/IBOs
  • Perspective Transformation
  • Rasterization through either a scanline or a tiled approach
  • Fragment Shading
  • A depth buffer for storing and depth testing fragments
  • Fragment to framebuffer writing
  • A simple lighting/shading scheme, such as Lambert as well as Blinn-Phong

Some additional features:
    • Back-face culling - Performance did not improve after implementing this. Infact, the FPS count decreased after implementing this test. I implemented this at the primitive assembly stage. One more problem which I faced in this implementation is that during the dot product test of back Face, my faces were disappearing as soon as the model turned back with 0.0. So, I increased this value to 0.6 and now it is delayed, but I can still see black spots while turning. However, on increasing it to 1.0f the black spots are completely gone. For now I have kept it to be 0.6f. 
    • Scissor test - Performance increased after implementing this test.
    • Correct color interpretation between points on a primitive
Video of the project:


Issue: Whenever I was moving the camera closer, my cuda was crashing. The reason I figured out was not the number of threads being created but the number of pixels being traced by each thread. Since moving the camera closer was increasing the number of pixel to be traced it failed.

Back Face Cull:

No comments:

Post a Comment