A simple raytracer written in C.

Raytracer

A simple raytracer in C, with diffuse and specular lighting, reflections, shadows, environment map, and a couple other features. Developed following the tutorial "Understandable RayTracing in 256 lines of bare C++" and "Ray Tracing in One Weekend".

Example (Converted from ppm to png.)

Building and Running

Currently, the program takes no arguments and outputs the image directly to stdout (in PPM format).

$ git clone --recurse-submodules # required for the libs
$ make
$ ./raytracer >out.ppm # or ./raytracer | display

You can change the rendering parameters at config.h.

Credits and License

Code is licensed under GPLv2. Other assets:

Owner
Matheus Tavares
FLOSS developer. MS student in Computer Science at USP.
Matheus Tavares
Similar Resources

physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

physically based renderer written in DX12 with image-based lighting, classic deffered and tiled lighting approaches

Features Classical Deferred Renderer Physically Based shading Image Based Lighting BRDF Disney model (Burley + GGX) Tangent space normal mapping Reinh

Apr 27, 2022

Tetris written with C++ and OpenGL.

Tetrec This is yet another Tetris game, which is in 3D, written using C++ and OpenGL 2.1, aiming at being lightweight towards not-so-beefy computers (

Jan 17, 2022

Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻

Yet another Chip-8 interpreter, this time written in C++ using GLFW and OpenGL as its graphics library 💻

Yet another Chip-8 interpreter, but this time with a beautiful interface 💻

Apr 20, 2022

My implementations of Ray Tracing in One Weekend written in many different languages.

Ray Tracing in Many Languages This repository contains my implementation of the Ray Tracing in One Weekend book written in several different programmi

Oct 19, 2021

A legacy OpenGL simulator for OpenGL 4.4, written in C++.

the-ancient-tri A legacy OpenGL simulator for OpenGL 4.4, written in C++. Why? My Uni forces us to use legacy OpenGL (eww!), and I didn't want to lear

Feb 10, 2022

Software RayTracing engine written in C++ without the usage of any libraries.

Software RayTracing engine written in C++ without the usage of any libraries.

Software Raytracing Engine This is a software unidirectional raytracing engine, fully written in C++17, with no dependencies or external libraries use

May 4, 2022

Metal-cpp is a low-overhead C++ interface for Metal that helps developers add Metal functionality to graphics apps, games, and game engines that are written in C++.

About metal-cpp is a low overhead and header only C++ interface for Metal that helps developers add Metal functionality to graphics applications that

May 11, 2022

Brute force volumetric path tracer written in C++

Brute force volumetric path tracer written in C++

volpt Brute force volumetric path tracer written in C++. WIP. Features Homogeneous medium Hero wavelength sampling for chromatic absorption/scattering

Apr 28, 2022
Related tags
My computer graphics playground. Currently has a raytracer implemented with D3D11 compute shader.
My computer graphics playground. Currently has a raytracer implemented with D3D11 compute shader.

Graphics Playground I use this project as my "toy" engine. I'll be implementing various graphics projects in this repository. The code here is not sui

Aug 26, 2021
My first RayTracer with miniLibX
My first RayTracer with miniLibX

miniRT My first RayTracer - 21 school project Description The goal of this project is to generate images using the Raytracing protocol. Those computer

Feb 15, 2022
Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.

Horde3D Horde3D is a 3D rendering engine written in C++ with an effort being as lightweight and conceptually clean as possible. Horde3D requires a ful

May 5, 2022
A library for high-performance, modern 2D graphics with SDL written in C.

SDL_gpu, a library for making hardware-accelerated 2D graphics easy. by Jonathan Dearborn SDL_gpu is licensed under the terms of the MIT License. See

May 20, 2022
Linux/X11 tool for intercepting mouse events and executing commands. Written in Kotlin Native.

XMG XMG (X11 Mouse Grabber) is a Linux/X11 tool for intercepting mouse button press events and triggering actions. It's a way of making use of the ext

Sep 11, 2021
SoL (for Speed of Light, or sun in Spanish) is a Physically-based rendering library written in modern C++

SoL (for Speed of Light, or sun in Spanish) is a small rendering library written in C++20. Its goal is to strike a good balance between performance and usability, and allow easy experimentation for rendering researchers.

Mar 3, 2022
A toy renderer written in C using Vulkan to perform real-time ray tracing research.

This is a toy renderer written in C using Vulkan. It is intentionally minimalist. It has been developed and used for the papers "BRDF Importance Sampl

May 15, 2022
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup

A minimalist and platform-agnostic interactive/real-time raytracer. Strong emphasis on simplicity, ease of use and almost no setup to get started with

Apr 23, 2022
🌞 A physically based monte carlo path tracer written in C++
🌞 A physically based monte carlo path tracer written in C++

Physically Based Path Tracer The below 3D model for the Head of Michelangelo's David bust was taken from this link. Other .obj files taken from The St

May 4, 2022
Gearcoleco is a cross-platform ColecoVision emulator written in C++.

This is an open source project with its ongoing development made possible thanks to the support by these awesome backers.

Apr 20, 2022