Skip to content

CatB1t/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This is a basic raytracer written from scratch in C++. It is designed to be cross-platform. Despite its simplicity, this raytracer can produce basic images with reflections and shading.

Example

Features

  • Basic raytracing capabilities
  • Scene confiugration using Lua
  • Phong Lighting
  • Shadow
  • Reflections

Supported Shapes (more to be added)

  • Sphere

Building and Compiling

Prerequisites

Building

  • Get the code git clone https://github.com/CatB1t/raytracer.git
  • Clone Lua source code into the directory vendor/lua/
  • In the project directory, run premake5 [action], e.g. premake vs2022
  • For toolsets like Visual Studio, you can simply load the generated solution IDE and build as you normally would
  • If you have generated makefiles, run make
  • You will find the executable in the build/bin/ directory, if you have a scene config, simply run ./raytracer
  • To generate a scene configuration file, use ./raytracer -g scene.lua

Options

  • -w to specify width. default 800
  • -h to specify height. default 800
  • -o to specify output file. default image
  • -c to specify scene configuration file, default scene.lua
  • -g name.lua to generate example scene configuration to name.lua

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published