Jormii / PSPRasterEngine

Raster engine for the PSP featuring a complete pipeline and custom shaders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PSP Raster Engine

This was a project I carried to learn C++ and 3D computer graphics, done for the PSP because I love the console and additionally the system provides tighter constraints.

The goal was simple: The PSP's hardware carries 3D operations using a specific chipset. However, this piece of hardware has a "fixed behaviour", meaning that it doesn't allow custom shaders (as far as I know). This program's purpose was to provide a complete 3D pipeline (excluding the clipping step) without using the 3D chipset the PSP provides.

The whole pipeline of the engine goes as follows: Vertex shader -> Backface culling + Rasterization -> Fragment shading.

Remarkable aspects

Render sample

Problems found

  • PSP's display and draw buffer's memory addresses lie in non-cachable space. Writing to them was extremely slow.
  • Rasterization is a huge bottleneck even though the process uses the VFPU almost entirely. The reason for the bottleneck must be something else like cache misses.
  • All in all, the program struggles to reach 20 fps rendering only a cube and a plane.

Abandoned project

While I wanted to keep working on the program, the above problems make it hard to make it feasible to end with a working real-time software. Even then, the following aspects are left to implement:

  • Other types of lights. Only point lights are provided.
  • Bump mapping.
  • Shadows and occlusions.

Bibliography

Books

  • Real-Time Rendering.
  • Real-Time Shadows.

Papers

  • "A Parallel Algorithm for Polygon Rasterization". Pineda, Juan.
  • "On the Hardware Implementation of Triangle Traversal Algorithms for Graphics Processing". Royer del Barrio, Pablo et al.

Others

About

Raster engine for the PSP featuring a complete pipeline and custom shaders


Languages

Language:C++ 99.6%Language:Python 0.3%Language:Makefile 0.0%Language:Shell 0.0%