GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ssloy/tinykaboom: A brief computer graphics / rendering course

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitpod.yml
.gitpod.yml
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Dockerfile
Dockerfile
 
 
Readme.md
Readme.md
 
 
geometry.h
geometry.h
 
 
kaboom.gif
kaboom.gif
 
 
kaboom.mp4
kaboom.mp4
 
 
out.jpg
out.jpg
 
 
tinykaboom.cpp
tinykaboom.cpp
 
 

Repository files navigation

KABOOM! in 180 lines of bare C++

This repository is a teaching aid for my computer graphics lectures. It is not meant to produce the ultimate or even physically realistic renders. It is meant to be simple. This project is distributed under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE.

Check the article that accompanies the source code.

This project is closely related to my software raytracer. If you are looking for a software rasterizer, check the other part of the lectures.

In my lectures I tend to avoid third party libraries as long as it is reasonable, because it forces to understand what is happening under the hood. So, the raytracing in 180 lines of plain C++ produces this result:

compilation

git clone https://github.com/ssloy/tinykaboom.git
cd tinykaboom
mkdir build
cd build
cmake ..
make

You can open the project in Gitpod, a free online dev evironment for GitHub:

Open in Gitpod

On open, the editor will compile & run the program as well as open the resulting image in the editor's preview. Just change the code in the editor and rerun the script (use the terminal's history) to see updated images.

Homework

The possibilities are infinte. For example, you can add the environment map and some transparency:

Add other objects and illuminate them:

About

A brief computer graphics / rendering course

github.com/ssloy/tinykaboom/wiki

Topics

3d3d-graphicsc-plus-pluscomputer-graphicscppfungraphicsgraphics-programminglearningraytracerraytracingraytracing-enginerenderingrendering-engineshaderstutorial

Resources

Readme
Activity

Stars

2.4k stars

Watchers

50 watching

Forks

109 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.