Skip to content

A one-file raytracer that draws into the linux framebuffer

Notifications You must be signed in to change notification settings

milgra/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

raytracer

A one-file raytracer that draws into the linux framebuffer.

raytrace

Has lights, shadows, reflection and refraction. Doesn't use any external frameworks or libraries, just the standard c and linux headers.

How to run it :

Compile the file : 'gcc raytrace.c -lm -o raytrace'

And then run it : './raytrace'

On some linux distros you may need root access rights to access the framebuffer, this case type : 'sudo ./raytrace'

If you don't see anything you probably have to switch to console mode because your window manager interferes with your framebuffer. Just switch to a console with CTRL+ALT+F1.

Check out the tutorials how to create this step-by-step :

Part one

Part two

Part three

Part four

About

A one-file raytracer that draws into the linux framebuffer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages