Skip to content

Ray Tracer Renderer written in C, based on the book 'The Ray Tracer Challenge'

License

Notifications You must be signed in to change notification settings

eladciuraru/ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer Renderer

This is my implementation for ray tracer renedering, introduced on the book "The Ray Tracer Challenge" by Jamis Buck. This is my first step in the world of computer graphics and renedering, so this project will probably be revisted and rewritten at a later stage.

Images

Sphere with light Scene with shadow

Build

This repo includes 2 batch scripts to compile this project.

  • shell.bat
  • build.bat

shell.bat

Helper script to setup all the required environment variables to be able to use the MSVC build tools. This script uses vswhere tool to find the latest installed build tools, and opens a shell.

$ shell.bat

REM This should work after running shell.bat:
$ cl.exe

build.bat

To use this script, the enviorment variables of the MSVC build tools should be set before calling this script. You can do this either by calling first shell.bat or by activating yourself the developer command prompt.

Note: This code base was developed and tested with the build tools provided with Visual Studio 2017

$ build.bat

Executables

Under the build output directory, you will find 3 executables named:

  • answers
  • tests
  • gen

answers

This exeutable is used to generate the output for the exercises of each chapter, you call this executable with the chapter number as parameter.

$ build\answers.exe <chapter_number>

tests

This exeutable contains the unit tests from the book, currently it runs all the tests.

gen

This is the main executable of the project, it gets as an input custom config of a scene, and renders it as a bitmap.

This is a work in progress, doesn't work yet!

About

Ray Tracer Renderer written in C, based on the book 'The Ray Tracer Challenge'

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published