Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [raytracing]

Ray tracing is a physics-based method for simulating photorealistic 3D scenes. Light rays are drawn from the eye through each pixel of the desired image, and the rays' interactions with the scene determine the displayed pixel color.

Filter by
Sorted by
Tagged with
8 votes
1 answer
320 views

Basic Ray Tracer

This is my first self-guided programming project, and all the math used in the program is self-taught. I wanted to get a better understanding of how computer graphics worked, but I just feel more ...
Jonas Banks's user avatar
5 votes
1 answer
185 views

Data Oriented Raytracing In a Weekend in Rust

I've been learning about Data Oriented Programming, and when trying to implement this simple Raytracer, I decided to do it in this manner using Rust. This is also in the context of an optimisation ...
TOOL's user avatar
  • 51
3 votes
2 answers
199 views

Ray tracer in c running slowly

I was learning C the past few days and decided to make a mini project to get a better feel for it following the Ray Tracing In a Weekend Series. I got it working however I feel like it is pretty slow ...
Aayush's user avatar
  • 61
6 votes
1 answer
683 views

ray-tracing in one weekend implementation

In the past I had followed the Ray Tracing in a Weekend books using C++ because that was what the book used. However, recently I started thinking about how hard it would be to implement using C and ...
nullptr's user avatar
  • 669
5 votes
2 answers
376 views

Ray implementation

Problem Statement/Context: Represent a ray, given a origin and direction. Besides this a min_t and max_t value are defined. ...
Vertexwahn's user avatar
6 votes
1 answer
122 views

Basic raytracer written in Rust

I come from a fairly strong background of C and thought that this project would be a good way to get a handle on Rust. Right now, I have everything in one file because I wasn't sure the best way to ...
Calvin Godfrey's user avatar
1 vote
0 answers
127 views

No performance gain with SIMD 3D vector for ray tracer

I wrote two versions of vector class for my ray tracer. Non-SIMD version and SIMD version. You can find the code below. I want to ask what things should I keep in mind to get max performance with SIMD....
videogamechef's user avatar
6 votes
1 answer
476 views

Type-safe Euclidean vectors in C++

I'm trying to follow the Raytracing in One Weekend book, and I found that he uses the same Vec3 class for everything - colors, coordinates, direction, and more: <...
EarlyEarthworm's user avatar
4 votes
0 answers
291 views

Fast ray/triangle intersection code in C

I wonder if someone is familiar with ray/triangle intersection algorithms and can help me optimize them? Here are my implementations of two ray/triangle intersection algorithms in C. The first is the ...
Gaslight Deceive Subvert's user avatar
12 votes
1 answer
223 views

Parser for a custom scene definition format for a raytracer

For a raytracer I’ve been writing with a classmate, we use a custom scene definition format that allows specifying shapes, composite shapes, materials, lights, cameras and transform and render ...
kleinfreund's user avatar
  • 3,681
4 votes
0 answers
88 views

Does this go raytracing program follow best practices, and typical project layout?

I'm working through learning Go, so as an exercise, I'm writing a simple raytracer. I'd like general feedback on the code style & architecture. Specific areas of concern: Is the project layout ...
YenTheFirst's user avatar
6 votes
1 answer
432 views

Ray Tracer main loop

For the past week I have been studying and improving a ray tracer that I ported from JavaScript. The bare finished port was only exactly what was written in JavaScript and rendered at around 20fps at ...
Lee Allan's user avatar
  • 353
3 votes
1 answer
487 views

Ray reflection with a triangle

I'm trying to reflect a ray of a triangle using Processing and not sure I got the code right. I'm using two bits of pseudo code from two locations: Intersection of a Line with a Plane from Paul ...
George Profenza's user avatar
6 votes
1 answer
3k views

Iterator over row and columns

I am writing a simple raytracer just for fun. I want to iterate over rows, and each row must be an iterator over columns. A strategy I produced is the following: ...
Stefano Borini's user avatar