All Projects → zauonlok → Renderer

zauonlok / Renderer

Licence: mit
A shader-based software renderer written from scratch in C89

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Renderer

Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+52.05%)
Mutual labels:  graphics, 3d, shaders, rendering, 3d-graphics, graphics-programming
Yave
Yet Another Vulkan Engine
Stars: ✭ 211 (-84.55%)
Mutual labels:  3d, shaders, rendering, 3d-graphics, pbr
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-86.75%)
Mutual labels:  graphics, 3d, rendering, graphics-programming, pbr
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (-63.84%)
Mutual labels:  graphics, 3d, shaders, rendering, 3d-graphics
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+190.7%)
Mutual labels:  graphics, 3d, shaders, rendering, 3d-graphics
Tinyrenderer
A brief computer graphics / rendering course
Stars: ✭ 11,776 (+762.08%)
Mutual labels:  graphics, 3d, shaders, rendering, 3d-graphics
3d Game Shaders For Beginners
🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
Stars: ✭ 11,698 (+756.37%)
Mutual labels:  graphics, 3d, shaders, 3d-graphics, graphics-programming
Methanekit
🎲 Modern 3D graphics made simple with cross-platform C++17 meta-API on top of DirectX 12 & Metal (Vulkan is coming)
Stars: ✭ 197 (-85.58%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming, cross-platform
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (-70.72%)
Mutual labels:  graphics, 3d, 3d-graphics, graphics-programming
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-94.29%)
Mutual labels:  graphics, rendering, 3d-graphics, graphics-programming
Tinyraycaster
486 lines of C++: old-school FPS in a weekend
Stars: ✭ 1,383 (+1.24%)
Mutual labels:  graphics, 3d, rendering, 3d-graphics
Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (-76.35%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming
Unity Dithered Transparency Shader
Unity material and shader for applying clipped, dithered transparency
Stars: ✭ 174 (-87.26%)
Mutual labels:  graphics, 3d, shaders, rendering
Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (-58.78%)
Mutual labels:  graphics, shaders, 3d-graphics, graphics-programming
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (-90.56%)
Mutual labels:  shaders, rendering, pbr, 3d-graphics
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (-67.42%)
Mutual labels:  graphics, 3d, 3d-graphics, graphics-programming
Beam
✨ Expressive WebGL
Stars: ✭ 383 (-71.96%)
Mutual labels:  graphics, 3d, pbr
Limonengine
3D FPS game engine with full dynamic lighting and shadows
Stars: ✭ 331 (-75.77%)
Mutual labels:  3d, 3d-graphics, cross-platform
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (-68.23%)
Mutual labels:  graphics, 3d, 3d-graphics
Enterprisepbrshadingmodel
Stars: ✭ 299 (-78.11%)
Mutual labels:  graphics, rendering, pbr

Software Renderer

This is a shader-based software renderer written from scratch in C89 with minimal dependencies, available for Windows, macOS, and Linux.

Features

  • Cross platform
  • Minimal dependencies
  • Shader based
  • Homogeneous clipping
  • Back-face culling
  • Perspective correct interpolation
  • Depth testing
  • Alpha testing
  • Alpha blending
  • Cubemapped skybox
  • Skeletal animation
  • Tangent space normal mapping
  • Shadow mapping
  • ACES tone mapping
  • Blinn–Phong reflection model
  • Physically based rendering (PBR)
  • Metallic-roughness workflow
  • Specular-glossiness workflow
  • Image-based lighting (IBL)
  • Orbital camera controls
  • PBR material inspector

Download

Pre-built binaries for Windows, macOS, and Linux are available for download from the Releases page.

Build

To build the software renderer from source, a C89 compiler and development files for your window system are required.

Windows

Install Visual Studio with C++ support and run build_win32.bat.

macOS

Install Command Line Tools for Xcode with the command below and run build_macos.sh.

xcode-select --install

Linux

Install GCC and Xlib with the following commands and run build_linux.sh.

Ubuntu / Debian

sudo apt install gcc libx11-dev

Fedora / RHEL

sudo dnf install gcc libX11-devel

openSUSE / SUSE

sudo zypper install gcc libX11-devel

Bonus

A CMakeLists.txt file is provided for generating project files using CMake (see examples below).

Visual Studio

mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
start Renderer.sln

Xcode

mkdir build
cd build
cmake -G Xcode ..
open Renderer.xcodeproj

Makefile

mkdir build
cd build
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ..
make

Usage

Launch

If the software renderer is launched without arguments, one of the available scenes will be chosen randomly. To display a specific scene (see below), additional arguments should be supplied. The command line syntax is:

Viewer [test_name [scene_name]]

Controls

  • Orbit: left mouse button
  • Pan: right mouse button
  • Zoom: mouse wheel
  • Rotate lighting: A D S W
  • Reset everything: Space

Inspector

For PBR scenes, a material inspector that is very similar to the layers view of Marmoset Viewer is provided. Double click to bring it up.

Screenshots

Scene Command
Viewer blinn azura
Viewer blinn centaur
Viewer blinn craftsman
Viewer blinn elfgirl
Viewer blinn kgirl
Viewer blinn lighthouse
Viewer blinn mccree
Viewer blinn nier2b
Viewer blinn phoenix
Viewer blinn vivi
Viewer blinn whip
Viewer blinn witch
Viewer pbr assassin
Viewer pbr buster
Viewer pbr crab
Viewer pbr dieselpunk
Viewer pbr drone
Viewer pbr helmet
Viewer pbr horse
Viewer pbr junkrat
Viewer pbr ornitier
Viewer pbr ponycar
Viewer pbr robot
Viewer pbr sphere
Viewer pbr spheres

References

Rendering pipeline

Physically based rendering

File formats

Miscellaneous

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].