Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Renderer

这是基于开源项目 tinyrenderer 开发的一款软光栅渲染器。在保留原项目特色(0图形API)的基础上,采用了更加modern的面向对象设计模式,并借鉴了OpenGL的上下文绑定、资源池化等设计理念。有计划在未来补上AO以及PBR渲染的内容~

部署

cmake -B build -DCMAKE_BUILD_TYPE=release 
cmake --build build -j
build/release/tinyrenderer <scene_name> [-r]|[-v]

其中,<scene_name>请参考configs目录下的scene.json,亦可自行对scene.json文件进行编辑以支持新模型/新场景。

效果图展示

Bresenham Line Algorithm

bresenham

Triangle Rasterization

triangle_rasterization

Flat Shading

african_head_flat diablo_flat Astarion_flat Darius_flat

Bling-Phong Shading

framebuffer_20260117_202035 framebuffer_20260113_202512 framebuffer_20260114_202250 Darius

Shadow Map (Soft Shadow with PCSS)

framebuffer_20260121_160935
2026-01-21.16.35.06.mov

双光源

framebuffer_20260119_222740
2026-01-21.16.41.04.mov

Credits

This project uses the following 3D models from Sketchfab:

About

基于开源项目 tinyrenderer 开发的一款软光栅渲染器。在保留原项目特色(0图形API)的基础上,采用了更加modern的面向对象设计模式,并借鉴了OpenGL的上下文绑定、资源池化等设计理念。有计划在未来补上AO以及PBR渲染的内容,原开源项目链接:https://github.com/ssloy/tinyrenderer。

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages