aboutsummaryrefslogtreecommitdiff
path: root/app/main.cpp
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2020-08-13 20:06:29 +0200
committerJulian T <julian@jtle.dk>2020-08-13 20:06:29 +0200
commit5b0b916c561f602723b9ae80f5462a7939b652a1 (patch)
tree6ee419f0dd1649b2c329585551f06a555a631db8 /app/main.cpp
parent690b72664ca8d471f5c117f6ed87aeae2de0a208 (diff)
Pathtracing working with defuse and emissive lighting
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/main.cpp b/app/main.cpp
index e174d4d..48e26fe 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -18,19 +18,20 @@ int main(int argc, char *argv[])
Material blue(Color(0.3, 0.3, 1), 1);
Material red(Color(1, 0.3, 0.3), 1);
Material white(Color(1, 1, 1), 1);
+ Material em(Color(1, 1, 1), 0, 2);
- scn.addShape(new Sphere(blue, Vec3d(2, 6, -1), 1));
+ scn.addShape(new Sphere(red, Vec3d(2, 6, -1), 1));
scn.addShape(new Sphere(white, Vec3d(0, 4, -1), 1.3));
scn.addShape(new Sphere(white, Vec3d(-2, 5, -2), 1.3));
- //scn.addShape(new Sphere(Vec3d(0, 7, 0), 0.5));
+ scn.addShape(new Sphere(blue, Vec3d(0, 7, 0), 0.5));
scn.addShape(new Plane(white, Vec3d(0, 0, 0), Vec3d(0, 1, 0)));
- scn.addShape(new Plane(white, Vec3d(0, 10, 0), Vec3d(0, 1, 0)));
+ scn.addShape(new Plane(em, Vec3d(0, 10, 0), Vec3d(0, 1, 0)));
scn.addShape(new Plane(white, Vec3d(0, 0, -5), Vec3d(0, 0, 1)));
scn.addShape(new Plane(red, Vec3d(-5, 0, 0), Vec3d(1, 0, 0)));
scn.addShape(new Plane(blue, Vec3d(5, 0, 0), Vec3d(1, 0, 0)));
- Renderer render(scn, Vec3d(0, 5, 4), Vec3d(0, 5, 0), 500, 500);
+ Renderer render(scn, Vec3d(0, 5, 4), Vec3d(0, 5, 0), 500, 500, 5);
MainWindow main(render);
main.show();