Skip to content

Emmanuel-Roy/ZeroGPU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroGPU (WIP)

A CPU-Based software renderer for the Raspberry Pi Zero 2 W. Zero "dedicated" GPU!

Donut

image image

Cube

image image

About

  • I made this project to learn more about the OpenGL, DirectX, and Vulkan Graphics Pipeline.
  • Despite the name, the PI Zero 2 W is just the platform this software will be developed on. Theoretically, you could run this renderer on anything from a powerful desktop to a Samsung Smart Fridge. I'm not your boss.
  • Think of this less of a hardware project, and more of a "can we make a microcontroller optimized version of OpenGL?"
  • I picked the PI Zero 2 W for a couple reasons.
    • It's really cheap. (15$)
    • While there is an even less powerful and even cheaper microcontroller (Pi Pico), I wouldn't be able to use C++, and most of the effort wouldn't be on the renderer but just getting to start point of the Pi Zero.

How it Works

  • The Graphics Pipeline for ZeroGPU is:

    • OBJ load → Vertex transform (rotation + scale) → Projection → Triangle assembly →
    • Rasterization (barycentric + Z-buffer) → Framebuffer output → Display (SDL2)
  • For reference, the OpenGL Graphics Pipeline is a bit more complicated:

    • Vertex Specification/Input → Vertex Shader → Tessellation Control Shader (optional) →
    • Tessellation Evaluation Shader (optional) → Geometry Shader (optional) → Clipping →
    • Rasterization → Fragment Shader → Per-Fragment Operations (depth/stencil/blend) → Framebuffer Output
  • As you can see, right now, ZeroGPU is a lot simpler than OpenGL. I'll be working to implement additional features, such as textures and Lighting, over time.

Disclaimer: I did use AI to assist me with writing the code for this project, however, almost all the technical design and function work was pre planned and written by me.

About

A CPU-Based software renderer built for the Raspberry Pi Zero 2 W.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages