feat(examples): add shading, the threaded render loop and two scenes

Lambertian and metal shading with recursive bounces, a row-claiming loop
across worker threads, and the studio and rings scene files.
This commit is contained in:
sneeker committed 2022-07-02 12:49:50 +00:00
1 parent 3da0447ea6
commit 23f8288a52
4 files changed
+167

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
# A ring of alternating metal and diffuse spheres around a central emitter.
camera 0 3.2 8.0 0 0.6 0 30
background 0.010 0.012 0.020
sphere 0.0 -500.0 0.0 500.0 lambert 0.55 0.55 0.58
sphere 2.60 0.55 0.00 0.55 metal 0.95 0.80 0.45 0.02
sphere 1.84 0.55 1.84 0.55 lambert 0.85 0.30 0.30
sphere 0.00 0.55 2.60 0.55 metal 0.85 0.85 0.90 0.10
sphere -1.84 0.55 1.84 0.55 lambert 0.30 0.75 0.45
sphere -2.60 0.55 0.00 0.55 metal 0.60 0.70 0.95 0.02
sphere -1.84 0.55 -1.84 0.55 lambert 0.80 0.55 0.20
sphere 0.00 0.55 -2.60 0.55 metal 0.90 0.90 0.90 0.00
sphere 1.84 0.55 -1.84 0.55 lambert 0.45 0.35 0.80
sphere 0.00 1.10 0.00 0.70 light 4.20 3.60 2.60
+13
View File
@@ -0,0 +1,13 @@
# Three spheres on a ground plane, lit by one emissive sphere overhead.
camera 0 1.4 7.5 0 0.7 0 34
background 0.020 0.028 0.045
# centre radius material albedo fuzz
sphere 0.0 -500.0 0.0 500.0 lambert 0.62 0.62 0.60
sphere -2.1 0.75 0.1 0.75 lambert 0.86 0.24 0.22
sphere 0.0 0.85 -0.3 0.85 metal 0.92 0.88 0.78 0.03
sphere 2.1 0.70 0.2 0.70 lambert 0.22 0.42 0.86
sphere 0.6 0.32 1.5 0.32 metal 0.75 0.75 0.80 0.28
sphere -0.9 0.28 1.7 0.28 lambert 0.90 0.72 0.20
sphere 0.0 6.20 1.0 3.20 light 3.60 3.40 3.00