aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-12-13 02:49:03 -0500
committersotech117 <michael_foiani@brown.edu>2023-12-13 02:49:03 -0500
commit256a50ddd591223cb2cab00cc4c2be62993077da (patch)
treeb1f0bebbdecb0c72d21eeb96876337235a5df135
parent87e614254bc0b1ad0f2ac28a5092c97caab09d7a (diff)
experiment with scene files
-rw-r--r--cmake-build-release/.ninja_depsbin553376 -> 560208 bytes
-rw-r--r--cmake-build-release/.ninja_log12
-rw-r--r--cmake-build-release/Testing/Temporary/LastTest.log4
-rwxr-xr-xcmake-build-release/projects_raybin353561 -> 353561 bytes
-rw-r--r--scenefiles-4d/five_shapes.json2
-rw-r--r--scenefiles-4d/unit_cube.json4
-rw-r--r--src/accelerate/myqtconcurrent.cpp2
-rw-r--r--src/illuminate/illuminate.cpp6
8 files changed, 21 insertions, 9 deletions
diff --git a/cmake-build-release/.ninja_deps b/cmake-build-release/.ninja_deps
index f9ce467..1f58ccf 100644
--- a/cmake-build-release/.ninja_deps
+++ b/cmake-build-release/.ninja_deps
Binary files differ
diff --git a/cmake-build-release/.ninja_log b/cmake-build-release/.ninja_log
index e50c793..cad333d 100644
--- a/cmake-build-release/.ninja_log
+++ b/cmake-build-release/.ninja_log
@@ -29,3 +29,15 @@
1693 2445 1702452579001092270 CMakeFiles/projects_ray.dir/src/aliasing/filter.cpp.o 9dee6d99978c214
1224 1917 1702452578473192908 CMakeFiles/projects_ray.dir/src/illuminate/shadow.cpp.o 976dc05943374640
1917 3319 1702452579874611066 CMakeFiles/projects_ray.dir/src/accelerate/myqtconcurrent.cpp.o 202e3ecc659447bc
+6 34 1702453038917081702 projects_ray_autogen/timestamp 55fca76aac650d2f
+6 34 1702453038917081702 projects_ray_autogen/mocs_compilation.cpp 55fca76aac650d2f
+6 34 1702453038917081702 /Users/sotech117/Documents/master/graphics/the-all-americans-in-cs1230/cmake-build-release/projects_ray_autogen/timestamp 55fca76aac650d2f
+6 34 1702453038917081702 /Users/sotech117/Documents/master/graphics/the-all-americans-in-cs1230/cmake-build-release/projects_ray_autogen/mocs_compilation.cpp 55fca76aac650d2f
+37 760 1702453039640098864 CMakeFiles/projects_ray.dir/src/illuminate/illuminate.cpp.o 36fb1526130d4f10
+760 869 1702453039751149956 projects_ray 45fbfe11691b47a4
+6 34 1702453551761047603 projects_ray_autogen/timestamp 55fca76aac650d2f
+6 34 1702453551761047603 projects_ray_autogen/mocs_compilation.cpp 55fca76aac650d2f
+6 34 1702453551761047603 /Users/sotech117/Documents/master/graphics/the-all-americans-in-cs1230/cmake-build-release/projects_ray_autogen/timestamp 55fca76aac650d2f
+6 34 1702453551761047603 /Users/sotech117/Documents/master/graphics/the-all-americans-in-cs1230/cmake-build-release/projects_ray_autogen/mocs_compilation.cpp 55fca76aac650d2f
+37 1350 1702453553072409034 CMakeFiles/projects_ray.dir/src/accelerate/myqtconcurrent.cpp.o 202e3ecc659447bc
+1350 1455 1702453553180119416 projects_ray 45fbfe11691b47a4
diff --git a/cmake-build-release/Testing/Temporary/LastTest.log b/cmake-build-release/Testing/Temporary/LastTest.log
index 032ef86..89188b7 100644
--- a/cmake-build-release/Testing/Temporary/LastTest.log
+++ b/cmake-build-release/Testing/Temporary/LastTest.log
@@ -1,3 +1,3 @@
-Start testing: Dec 13 02:32 EST
+Start testing: Dec 13 02:45 EST
----------------------------------------------------------
-End testing: Dec 13 02:32 EST
+End testing: Dec 13 02:45 EST
diff --git a/cmake-build-release/projects_ray b/cmake-build-release/projects_ray
index a433436..79e6095 100755
--- a/cmake-build-release/projects_ray
+++ b/cmake-build-release/projects_ray
Binary files differ
diff --git a/scenefiles-4d/five_shapes.json b/scenefiles-4d/five_shapes.json
index c6c6645..18245c5 100644
--- a/scenefiles-4d/five_shapes.json
+++ b/scenefiles-4d/five_shapes.json
@@ -8,7 +8,7 @@
"gravity": [0.0, -0.0098, 0.0, 0.0]
},
"cameraData": {
- "position": [30.0, 30.0, 30.0, 30.0],
+ "position": [-10.0, -10.0, -10.0, -10.0],
"up": [0.0, 1.0, 0.0, 0.0],
"heightAngle": 30.0,
"focus": [0.0, 0.0, 0.0, 0.0],
diff --git a/scenefiles-4d/unit_cube.json b/scenefiles-4d/unit_cube.json
index 6810d2e..6b1ee6f 100644
--- a/scenefiles-4d/unit_cube.json
+++ b/scenefiles-4d/unit_cube.json
@@ -13,8 +13,8 @@
"heightAngle": 30.0,
"depthAngle": 30.0,
"focus": [0.0, 0.0, 0.0, 0.0],
- "over": [0.0, 1.0, 0.0, 0.0]
- },
+ "over": [0.0, 0.0, 0.0, 1.0]
+},
"groups": [
{
"lights": [
diff --git a/src/accelerate/myqtconcurrent.cpp b/src/accelerate/myqtconcurrent.cpp
index 08248f4..4d0cb1e 100644
--- a/src/accelerate/myqtconcurrent.cpp
+++ b/src/accelerate/myqtconcurrent.cpp
@@ -52,7 +52,7 @@ void RayTracer::renderParallel(RGBA *imageData, const RayTraceScene &scene)
float z = (imageDepth - scene.depth()/2.f) * viewplaneDepth / scene.depth();
glm::vec4 pWorld = Vec4Ops::transformPoint4(glm::vec4(0.f), camera.getViewMatrix(), camera.getTranslationVector());
- glm::vec4 dWorld = Vec4Ops::transformDir4(glm::vec4(x, y, z, -1.0), camera.getViewMatrix());
+ glm::vec4 dWorld = glm::normalize(Vec4Ops::transformDir4(glm::vec4(x, y, z, -1.0), camera.getViewMatrix()));
pixelRoutineArgs args{
pWorld,
diff --git a/src/illuminate/illuminate.cpp b/src/illuminate/illuminate.cpp
index 641f06d..a651924 100644
--- a/src/illuminate/illuminate.cpp
+++ b/src/illuminate/illuminate.cpp
@@ -87,10 +87,10 @@ glm::vec4 RayTracer::illuminatePixel(
}
}
- // auto incidentDir = -directionToCamera;
+ auto incidentDir = -directionToCamera;
// recursive raytracing for the reflection and refraction (see reflect.cpp)
- // illumination += refract(intersectionWorld, normalWorld, incidentDir, shape, scene, depth + 1);
- // illumination += reflect(intersectionWorld, normalWorld, incidentDir, shape, scene, depth + 1);
+ illumination += refract(intersectionWorld, normalWorld, incidentDir, shape, scene, depth + 1);
+ illumination += reflect(intersectionWorld, normalWorld, incidentDir, shape, scene, depth + 1);
return illumination;
} \ No newline at end of file