Understanding PS1-Style Jitter and Sub-Pixel Rendering

Listen to this Post

In the realm of graphics rendering, particularly in older consoles like the PS1, the phenomenon of “polygon jaggies” or PS1-style jitter is a well-known artifact. This occurs when the rasterizer cannot calculate partial pixel coverage, leading to pixels being either fully ON or OFF. This article delves into the technical aspects of this issue and explores the trade-offs developers faced.

You Should Know:

1. Integer Coordinates and GPU Calculations:

  • Using integer coordinates for vertices is a common technique to reduce the computational cost on GPUs. However, this approach can lead to inaccuracies in rendering, especially when dealing with rotating triangles.
  • Command to Simulate Integer Coordinates:
    glVertex2i(x, y); // OpenGL command to specify vertex coordinates using integers
    

2. Fixed-Point Arithmetic:

  • Contrary to popular belief, the PS1’s rendering artifacts are not due to the lack of a Floating-Point Unit (FPU). Floating-point calculations can still be performed using fixed-point arithmetic, albeit at a slower pace.
  • Example of Fixed-Point Arithmetic in C:
    int fixed_multiply(int a, int b) {
    return (a * b) >> 16; // Fixed-point multiplication with 16-bit precision
    }
    

3. Sub-Pixel Rendering:

  • Sub-pixel rendering techniques can mitigate the jaggies by allowing partial pixel coverage. However, this comes at a performance cost, which was often deemed too high by developers of older consoles.
  • Linux Command to Enable Sub-Pixel Rendering:
    xrandr --output HDMI-1 --set "scaling mode" "Full aspect"
    

4. Practical Experiment with Graph Paper: