Skip to content

Following the mini book by Peter Shirley, RayTracing in a Weekend, I learned RayTracing via C++

Notifications You must be signed in to change notification settings

wbang24/RayTracingWeekend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation



My Learning Journey From Peter Shirley’s RayTracing in a Weekend

Not having touched C++ for a while, this mini book was the perfect refresher and an insight to some things that I didn’t know about c++. The following are screenshots of my progress.

Chapter 1:

The hello world of computer graphics

hello world

Chapter 2
added vect3 header
vect 3 contains all the 3D math calculations
vec3

Chapter 3

added the ray.h file. This is how we send rays to compute what colour is seen from the direction of the rays.

enter image description here

Chapter 4

Adding a red sphere on top of our previous rendering

enter image description here

Chapter 5

Surface normals

first attempt
enter image description here

second attempt failed (WHAT’S GOING ON?)
enter image description here

It turns out I had hit_sphere as a bool class and not a float class as Peter Shirley Instructed

Successful Attempt

enter image description here

Chapter 6

Adding some anti-aliasing

enter image description here

Chapter 7
Adding Diffuse Material
enter image description here

Chapter 8
Adding Metal Material
enter image description here

Chapter 9
Adding reflective materials that resemble water or glass. This is called Dielectrics.

(Left Sphere has Dielectric material)
enter image description here

Chapter 10

Creating a positionable camera
enter image description hereenter image description here

Chapter 11
Adding focus and defocus blur

enter image description here

Chapter 12
Creating the cover of the Mini Book. Using a random_scene() function, creating many spheres with different materials.

(note the image will take a long while to finish rendering)

enter image description here

Final Image

About

Following the mini book by Peter Shirley, RayTracing in a Weekend, I learned RayTracing via C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages