Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

foolrenderer

> 包管理
Open source

A tiny software renderer implemented from scratch without the use of graphics API, used to understand how GPUs work.

1.1K stars0 likes3 views
WebsiteGitHub

About

A tiny software renderer implemented from scratch without the use of graphics API, used to understand how GPUs work.

foolrenderer

foolrenderer is a tiny software renderer implemented from scratch without the use of graphics API, used to understand how GPUs work. The primary goal for foolrenderer is to demonstrate some real-time rendering techniques for video games.

  • Small. Only a few thousand lines of code, no complex dependencies.
  • Simple. Focus on the fundamentals of rendering.
  • Readable. A quarter of the source code is comments, and every mathematical calculation has a formula explanation.

⛳ Prerequisites

To build foolrenderer, you must first install the following tools:

Windows

  • Visual Studio 2019 version 16.2 (or more recent)
  • CMake 3.21 (or more recent)

Make sure your Visual Studio has Clang compiler tools installed. If you don't already have the tools, you can install them by opening the Visual Studio Installer and choosing C++ Clang tools for Windows under Desktop development with C++ optional components.

macOS

  • Xcode 12.3 (or more recent)
  • CMake 3.21 (or more recent)

After installing Xcode you need to make sure the command line tools are set up by running:

bash
$ xcode-select --install

Build and Run

The following shows how to build and run foolrenderer from the command line.

Some editors and IDEs (like VSCode, CLion, Visual Studio) support editing, building and debugging CMake projects. Please refer to related documents for usage.

Build

First, create a build folder in the project root directory. Then use CMake commands to build the project:

bash
$ cd foolrenderer
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .

Run

If the build is successful, you can run the generated executable in the build directory. foolrenderer will store the rendering result in a TGA format image.

Features Showcase

How to Learn Computer Graphics

Here are some useful tutorials for self-study computer graphics. You can also find links to the corresponding literature at each algorithm in the source code.

Getting Started

  • Grant Sanderson 2016, Essence of linear algebra - Learning graphics requires knowing the basic concepts of linear algebra, and this series of videos will help you enjoy mastering vectors, matrices and other mathematical tools.
  • Dmitry V. Sokolov 2015, Tiny renderer or how OpenGL works: software rendering in 500 lines of code - An excellent introductory course in computer graphics. After taking this course you will find that learning OpenGL has become a lot easier.
  • Lingqi Yan 2020, GAMES101: Introduction to Computer Graphics (Chinese course) - Courses cover rasterization, geometry, ray tracing and animation. If you are a Chinese speaker, this course can help you get started quickly.

Advanced

  • Joey de Vries 2014, LearnOpenGL - When you master the basics of graphics, you can easily get started with graphics APIs such as OpenGL. You can learn advanced features like Shadow Mapping, Gamma Correction, Normal Mapping, HDR, SSAO and more in this course.
  • Lingqi Yan 2021, GAMES202: Real-Time High Quality Rendering (Chinese course) - The course introduces many real-time rendering techniques widely adopted by the industry, such as shadows, environment mapping, global illumination, physically based shading, real-time ray tracing, etc.
  • Grant Sanderson 2017, Essence of calculus - Watching this series of videos will at least help you understand the rendering equation.

Physically Based Rendering

  • Naty Hoffman 2013, Background: Physics and Math of Shading
  • Shree K. Nayar 2021, Radiometry and Reflectance - The first 7 videos of this play list are helpful for understanding Radiometry and BRDF.
  • Charles de Rousiers & Sébastian Lagarde 2014, Moving Frostbite to PBR - The EA DICE team detailed the PBR implementation of the Frostbite engine in this course. Hope the Battlefield 2042 update goes well.
  • Romain Guy & Mathias Agopian 2018, Physically Based Rendering in Filament

❤️ License

Copyright (c) Caden Ji. All rights reserved.

Licensed under the MIT license.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C3d-graphicscomputer-graphicsgamedevgraphics

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category包管理
PricingOpen source

> Related tools

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image