aboutsummaryrefslogtreecommitdiff
path: root/app/main.cpp
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-01-14 00:56:57 +0100
committerJulian T <julian@jtle.dk>2021-01-14 00:56:57 +0100
commit57c2f9241543a7d18eab98077530730d49ee10c2 (patch)
tree9dcb819f6c89621f214346a3cbbc88762d05d831 /app/main.cpp
parent8251be3e7ec0e381391c951fd4c8f1ab8080bef9 (diff)
Replace color with pbr-book inspired Spectrum class
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/main.cpp b/app/main.cpp
index ebb0536..0455ba7 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -4,6 +4,7 @@
#include "mainwindow.hpp"
#include <core/vector.hpp>
+#include <core/spectrum.hpp>
#include <scene.hpp>
#include <render.hpp>
#include <object.hpp>
@@ -23,11 +24,11 @@ int main(int argc, char *argv[])
conf.m_workers = 4;
- Material blue(Color(0.3, 0.3, 1), 1);
- Material green(Color(0.3, 1, 0.3), 0, 1, 50);
- Material red(Color(1, 0.3, 0.3), 1);
- Material white(Color(1, 1, 1), 1);
- Material em(Color(1, 1, 1), 0, 0, 0, 2);
+ Material blue(Spectrum::FromRGB(0.3, 0.3, 1), 1);
+ Material green(Spectrum::FromRGB(0.3, 1, 0.3), 0, 1, 50);
+ Material red(Spectrum::FromRGB(1, 0.3, 0.3), 1);
+ Material white(Spectrum::FromRGB(1, 1, 1), 1);
+ Material em(Spectrum::FromRGB(1, 1, 1), 0, 0, 0, 2);
scn.addShape(new Sphere(red, Vec3d(2, 6, -1), 1));
scn.addShape(new Sphere(green, Vec3d(0, 4, -1), 1.3));