Tiny C++ Software Renderer/Rasterizer

Overview

SoftGLRender

Tiny C++ Software Renderer/Rasterizer, it implements the main GPU rendering pipeline, 3D models (GLTF) are loaded by assimp, and using GLM as math library.

Features

  • Wireframe
  • View Frustum culling
  • Back-Front culling
  • Orbit Camera Controller
  • Perspective Correct Interpolation
  • Reversed Z
  • Early Z
  • Tangent Space Normal Mapping
  • Basic Lighting
  • Blinn-Phong shading
  • PBR & IBL shading
  • Skybox CubeMap & Equirectangular
  • Texture mipmaps
  • Texture tiling and swizzling (linear, tiled, morton)
  • Texture filtering and wrapping
  • Shader varying partial derivative dFdx dFdy
  • Alpha mask & blend

Texture Filtering

  • NEAREST
  • LINEAR
  • NEAREST_MIPMAP_NEAREST
  • LINEAR_MIPMAP_NEAREST
  • NEAREST_MIPMAP_LINEAR
  • LINEAR_MIPMAP_LINEAR

Texture Wrapping

  • REPEAT
  • MIRRORED_REPEAT
  • CLAMP_TO_EDGE
  • CLAMP_TO_BORDER
  • CLAMP_TO_ZERO

Texture Fetch

  • Lod
  • Bias
  • Offset

Anti Aliasing

  • SSAA
  • FXAA

TODO

  • MSAA\TAA
  • Shadow Map

Showcase

Render Textured

  • BoomBox (PBR)

  • Robot

  • DamagedHelmet (PBR)

  • GlassTable

  • AfricanHead

  • Brickwall

  • Cube

Render Wireframe

Check "show clip" to show the triangles created by frustum clip

Dependencies

Build

mkdir build
cd build
cmake ..
make

Run

cd bin
./SoftGLRender

License

This code is licensed under the MIT License (see LICENSE).

You might also like...
Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software

License MIT and CC0 or Public Domain, whichever is least restrictive -- Use it AS IS - NO IMPLICIT OR EXPLICIT warranty This may break your computer,

MasterPlan is a project management software / visual idea board software. It attempts to be easy to use, lightweight, and fun.
MasterPlan is a project management software / visual idea board software. It attempts to be easy to use, lightweight, and fun.

MasterPlan is a customizeable graphical project management software for independent users or small teams. If you need to share plans across a whole co

JoyfulNoise Tiny Utility Board

JoyfulNoise Tiny Utility Board A versatile ATtiny85-powered Eurorack module in 4HP. License JoyfulNoise hardware and software is Open Source. The JNTU

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6
Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6

Elk is a tiny embeddable JavaScript engine that implements a small but usable subset of ES6. It is designed for microcontroller development. Instead of writing firmware code in C/C++, Elk allows to develop in JavaScript. Another use case is providing customers with a secure, protected scripting environment for product customisation.

Tiny FEL tools for allwinner SOC, support RISC-V D1 chip

XFEL Tiny FEL tools for allwinner SOC, support RISC-V D1 chip. How to build The xfel tools depends on the libusb-1.0 library, you need to install libu

A tiny external monitor for PC using STM32 and ST7789. Connects to PC over USB and displays the captured screen on ST7789 (240x240) display.
A tiny external monitor for PC using STM32 and ST7789. Connects to PC over USB and displays the captured screen on ST7789 (240x240) display.

STM32 Tiny Monitor A super tiny monitor for your PC, suitable for your pet ant. A python script sends the captured screen over USB to the STM32 microc

Tiny weather station based on TTGO T5 V2.3.1 (ESP32 with 2.13
Tiny weather station based on TTGO T5 V2.3.1 (ESP32 with 2.13

Tiny weather station based on TTGO T5 V2.3.1 (ESP32 with 2.13" e-ink display) Features wireless and rechargable weather description including temperat

A tiny Forth I built in a week.
A tiny Forth I built in a week.

( Wrote a blog post about this here ) It was raining hard, a week ago. And what could you possibly do on a rainy Saturday afternoon? Well... You can m

Retro Tiny Multitasking system for Z80 based computers

RTM-Z80 RTM/Z80 is a multitasking kernel, built for Z80 based computers, written in Z80 assembly language, providing its users with an Application Pro

Owner
Keith
Graphic & Game
Keith
3D Software Rasterizer for R

rayvertex Rayvertex is a 3D software renderer that allows you to generate 3D visualizations without worrying about hardware requirements or dependenci

null 59 Dec 27, 2022
A software rasterizer with nice syntax.

Acleris A software rasterizer with nice syntax. The main goal of the project was to learn how rasterization works, and to try to do it in a fast way.

Dennis 8 Dec 5, 2022
DOOM BSP renderer for ZenithOS.

Zenith DOOM This project ports the DOOM BSP renderer to Zenith for use in custom games. It includes a zos/ directory in src/ which has includes that e

null 3 Jun 10, 2021
refterm is a reference renderer for monospace terminal displays.

refterm v2 refterm is a reference renderer for monospace terminal displays. It was designed to demonstrate that even in the worst-case scenario - extr

Casey Muratori 1.3k Jan 1, 2023
Super Simple Scene Renderer

SSSR Super Simple Scene Renderer Feature Rendering path Forward rendering Deferred rendering Physically based rendering GGX Image based lighting Equir

AICDG 5 Dec 9, 2021
Mitsuba renderer main repository

Mitsuba — Physically Based Renderer http://mitsuba-renderer.org/ About Mitsuba is a research-oriented rendering system in the style of PBRT, from whic

Mitsuba Physically Based Renderer 924 Dec 27, 2022
Immediate-mode fork of the mitsuba renderer. (See Wiki for branches.)

Mitsuba IM — Physically Based Renderer (Interactive Fork) Mitsuba IM is a fork of the comprehensive physically-based renderer mitsuba (http://mitsuba-

Tobias Zirr 65 Nov 20, 2022
Simple font renderer library written in Opengl 3.3 using stb_truetype.h to load a packed bitmap into texture of a .ttf font.

mv_easy_font Simple font renderer library written in Opengl 3.3 using stb_truetype.h to load a packed bitmap into texture of a .ttf font. Uses instanc

null 27 May 13, 2022
Binaural EBU ADM Renderer

Binaural EBU ADM Renderer (BEAR) The BEAR is a binaural renderer for ADM content. It is based on the EAR, and is is integrated into the EAR Production

European Broadcasting Union 10 Sep 6, 2022
This is a tool for software engineers to view,record and analyse data(sensor data and module data) In the process of software development.

![Contributors][Huang Jianyu] Statement 由于工具源码在网上公开,除使用部分开源项目代码外,其余代码均来自我个人,工具本身不包含公司的知识产权,所有与公司有关的内容均从软件包中移除,软件发布遵循Apache协议,任何人均可下载进行修改使用,如使用过程中出现任何问

HuangJianyu 36 Dec 25, 2022