diff --git a/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# b/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# index 1b961cb..d5b1e95 100644 --- a/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# +++ b/Step 3/.~lock.Dev Log Week of 2022-10-23.odt# @@ -1 +1 @@ -,brett,laforge,23.10.2022 16:35,file:///home/brett/.config/libreoffice/4; \ No newline at end of file +,brett,laforge,25.10.2022 01:05,file:///home/brett/.config/libreoffice/4; \ No newline at end of file diff --git a/Step 3/Dev Log Week of 2022-10-23.odt b/Step 3/Dev Log Week of 2022-10-23.odt index ffe3033..42159e8 100644 Binary files a/Step 3/Dev Log Week of 2022-10-23.odt and b/Step 3/Dev Log Week of 2022-10-23.odt differ diff --git a/Step 3/cmake-build-debug/.ninja_deps b/Step 3/cmake-build-debug/.ninja_deps index 173e883..b529e60 100644 Binary files a/Step 3/cmake-build-debug/.ninja_deps and b/Step 3/cmake-build-debug/.ninja_deps differ diff --git a/Step 3/cmake-build-debug/.ninja_log b/Step 3/cmake-build-debug/.ninja_log index eba2f3b..f3ad98c 100644 --- a/Step 3/cmake-build-debug/.ninja_log +++ b/Step 3/cmake-build-debug/.ninja_log @@ -11,3 +11,59 @@ 1 787 1666549780832519379 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o 53ce7d6ed877d888 1 1887 1666557242536188075 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 1 1178 1666549740059765852 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o e9e3fe6fe9a4de66 +2 1991 1666645817344070539 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 12778f168a75833b +2 1997 1666645817348070656 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o cf522ea42b0f8fd3 +2 2207 1666645817560076697 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o f8031520e846a554 +1 2211 1666645817564076808 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +3 2328 1666645817680080118 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o dc4b23b5e01a8208 +4 2331 1666645817684080231 CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o 89b6559e07a1508c +2 2531 1666645817884085928 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 2552 1666645817908086612 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 2940 1666645818292097558 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +3 3104 1666645818456102230 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o 707f99c685c75a0f +3 3490 1666645818844113291 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o d81abd5f968f8f53 +2 3803 1666645819156122183 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o f152a6b2309aba93 +3803 3951 1666645819304126399 Step_3 48736482bab78a22 +1 1568 1666645880121863552 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1568 1715 1666645880269867788 Step_3 48736482bab78a22 +1 1555 1666646066503227437 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1555 1701 1666646066647231601 Step_3 48736482bab78a22 +1 1823 1666646367623984315 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1823 1981 1666646367779988873 Step_3 48736482bab78a22 +1 1618 1666646387872576034 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1618 1766 1666646388016580243 Step_3 48736482bab78a22 +1 816 1666648980721500521 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 3e7c95bef1d0ddaa +1 979 1666648980885505392 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d5972a669671ede +1 1601 1666648981505523799 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 1831 1666648981733530568 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 2011 1666648981913535912 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2011 2158 1666648982061540306 Step_3 48736482bab78a22 +1 1404 1666659166617594460 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +1 1538 1666659166753598417 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 1788 1666659167001605628 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 1970 1666659167181610862 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1970 2129 1666659167341615517 Step_3 48736482bab78a22 +1 1374 1666659179841979100 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2 1814 1666659180245990856 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 1814 1666659180257991205 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 1999 1666659180465997254 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1999 2154 1666659180618001677 Step_3 48736482bab78a22 +0 1375 1666659193026362717 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +1 1577 1666659193226368536 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +1 1806 1666659193454375172 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 1966 1666659193614379828 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1966 2118 1666659193766384252 Step_3 48736482bab78a22 +1 1331 1666659585537832115 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2 1559 1666659585765838799 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 1777 1666659585981845130 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1 1985 1666659586189851228 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +1985 2133 1666659586337855566 Step_3 48736482bab78a22 +1 1508 1666673054183662428 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 4ca9d05ad8f3d295 +2 1801 1666673054479669816 CMakeFiles/Step_3.dir/src/engine/world.cpp.o fa088ebdd4dea6cb +2 2076 1666673054751676601 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +2 2186 1666673054863679392 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 9281ecbfd964c525 +2186 2396 1666673055071684581 Step_3 48736482bab78a22 +1 1781 1666673105960961266 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1781 1932 1666673106112965100 Step_3 48736482bab78a22 +1 1809 1666673610662169502 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 39bc1042baf06dcd +1809 1966 1666673610818173691 Step_3 48736482bab78a22 diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o index 054c783..511c499 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/globals.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o index 2db4e2f..ee5f31d 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o index 8773a11..b850846 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/main.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o index 8226c24..4f2c29e 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o index 587d579..5181b61 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o index 95d3a26..a1cd5a1 100644 Binary files a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/engine/world.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o new file mode 100644 index 0000000..f69905b Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o new file mode 100644 index 0000000..2feecb9 Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o new file mode 100644 index 0000000..ed901b3 Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o new file mode 100644 index 0000000..7801f21 Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o new file mode 100644 index 0000000..e6d1388 Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o differ diff --git a/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o new file mode 100644 index 0000000..6cf6a6e Binary files /dev/null and b/Step 3/cmake-build-debug/CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o differ diff --git a/Step 3/cmake-build-debug/Step_3 b/Step 3/cmake-build-debug/Step_3 index 748b020..fb01676 100755 Binary files a/Step 3/cmake-build-debug/Step_3 and b/Step 3/cmake-build-debug/Step_3 differ diff --git a/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log b/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log index 1409120..bae5315 100644 --- a/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log +++ b/Step 3/cmake-build-debug/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Oct 23 17:31 EDT +Start testing: Oct 25 00:53 EDT ---------------------------------------------------------- -End testing: Oct 23 17:31 EDT +End testing: Oct 25 00:53 EDT diff --git a/Step 3/cmake-build-release/.ninja_deps b/Step 3/cmake-build-release/.ninja_deps index d0da168..807bb1f 100644 Binary files a/Step 3/cmake-build-release/.ninja_deps and b/Step 3/cmake-build-release/.ninja_deps differ diff --git a/Step 3/cmake-build-release/.ninja_log b/Step 3/cmake-build-release/.ninja_log index e4153a1..5b5381f 100644 --- a/Step 3/cmake-build-release/.ninja_log +++ b/Step 3/cmake-build-release/.ninja_log @@ -1,63 +1,92 @@ # ninja log v5 2 1891 1666585888837654600 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_tables.cpp.o f6dab204e07e8dcf 1 2520 1666585889465673262 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_demo.cpp.o 7798aba97da63e31 -2 1215 1666586380064703198 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 -1 931 1666485931704398072 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74 +1 1180 1666647847647760960 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 893 1666647453395941912 CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o d86a254d2bce8f74 1 2507 1666586381356743089 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b -0 1005 1666485931780400210 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511 +1 790 1666646611351123446 CMakeFiles/Step_3.dir/src/engine/globals.cpp.o 4ef77d2224f86511 1 775 1666586379624689616 CMakeFiles/Step_3.dir/src/engine/math/colliders.cpp.o 39e9f435096d066b 1 1190 1666586380040702460 CMakeFiles/Step_3.dir/src/engine/util/models.cpp.o 164394d360c43072 1 6680 1666585893625796878 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui.cpp.o 55e7538fd27b47be -1269 1327 1666635539446334094 Step_3 8f1219d6aeb34ef1 +1685 1756 1666647848219778095 Step_3 8f1219d6aeb34ef1 2 1091 1666586379944699493 CMakeFiles/Step_3.dir/src/graphics/shader.cpp.o 25fdf04995cdd7fe -2 1269 1666635539386332332 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1427 1666647847895768387 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca 2 18 1666551030126621525 CMakeFiles/Step_3.dir/src/graphics/input.cpp.o 510001b0955ab019 1 3563 1666585915222438568 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_draw.cpp.o f89fa3d7b779872a -2 777 1666551030882641567 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d 1 4522 1666585908106227137 CMakeFiles/Step_3.dir/src/graphics/imgui/imgui_widgets.cpp.o 84017388bc7af144 -1 1584 1666621857421094763 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +2 777 1666551030882641567 CMakeFiles/Step_3.dir/src/graphics/graphics.cpp.o ce988de97a5cb51d +1 1685 1666647848151776055 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e 1 1350 1666485932124409891 CMakeFiles/Step_3.dir/src/engine/util/parser.cpp.o 1007c86c207ac940 -1 1280 1666635635157143301 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1280 1336 1666635635213144945 Step_3 8f1219d6aeb34ef1 -1 1350 1666643857289327365 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1350 1409 1666643857349329260 Step_3 8f1219d6aeb34ef1 -2 1307 1666644034694883613 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1307 1368 1666644034754885478 Step_3 8f1219d6aeb34ef1 -1 1260 1666644077040197609 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1260 1318 1666644077096199341 Step_3 8f1219d6aeb34ef1 -1 1437 1666644259921830797 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1437 1495 1666644259981832636 Step_3 8f1219d6aeb34ef1 -1 1391 1666644284674588821 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1392 1478 1666644284758591393 Step_3 8f1219d6aeb34ef1 -1 1350 1666644323383772456 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1350 1408 1666644323439774169 Step_3 8f1219d6aeb34ef1 -1 1317 1666644352184651781 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1317 1376 1666644352244653614 Step_3 8f1219d6aeb34ef1 -1 1287 1666644421238755838 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1287 1343 1666644421294757542 Step_3 8f1219d6aeb34ef1 -1 1658 1666644468140181806 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1658 1713 1666644468360188490 Step_3 8f1219d6aeb34ef1 -0 1286 1666644667774228323 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1286 1345 1666644667830230015 Step_3 8f1219d6aeb34ef1 -1 1285 1666644695339060754 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1285 1341 1666644695395062445 Step_3 8f1219d6aeb34ef1 -2 1321 1666644802614295836 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1322 1378 1666644802670297523 Step_3 8f1219d6aeb34ef1 -1 1327 1666644863296122994 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1328 1385 1666644863352124680 Step_3 8f1219d6aeb34ef1 -1 1288 1666644877316544899 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1288 1344 1666644877372546584 Step_3 8f1219d6aeb34ef1 -1 1247 1666644976655531757 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1247 1305 1666644976711533442 Step_3 8f1219d6aeb34ef1 -1 1270 1666645178657594515 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1270 1330 1666645178713596192 Step_3 8f1219d6aeb34ef1 -1 1314 1666645197202150504 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1315 1370 1666645197258152184 Step_3 8f1219d6aeb34ef1 -1 1279 1666645246315622589 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1280 1335 1666645246371624267 Step_3 8f1219d6aeb34ef1 -1 1250 1666645298025171905 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1250 1307 1666645298085173702 Step_3 8f1219d6aeb34ef1 -1 1191 1666645336534325353 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1191 1249 1666645336590327029 Step_3 8f1219d6aeb34ef1 -1 1183 1666645475026471380 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca -1183 1239 1666645475078472937 Step_3 8f1219d6aeb34ef1 +1 1367 1666647966819326919 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1622 1666647967075334573 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1622 1679 1666647967131336247 Step_3 8f1219d6aeb34ef1 +1 1128 1666648175653560817 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1385 1666648175909568451 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1693 1666648176217577633 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1693 1750 1666648176273579304 Step_3 8f1219d6aeb34ef1 +0 1388 1666648512951602890 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1388 1444 1666648513007604555 Step_3 8f1219d6aeb34ef1 +1 1410 1666648571429341661 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1410 1465 1666648571485343326 Step_3 8f1219d6aeb34ef1 +1 1437 1666648657435898107 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1437 1493 1666648657491899768 Step_3 8f1219d6aeb34ef1 +2 1469 1666648695053015942 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1469 1526 1666648695109017607 Step_3 8f1219d6aeb34ef1 +1 1416 1666648725805929686 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1416 1472 1666648725861931349 Step_3 8f1219d6aeb34ef1 +1 1461 1666648807364352517 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1461 1518 1666648807424354299 Step_3 8f1219d6aeb34ef1 +1 1414 1666648843773433914 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1414 1469 1666648843825435458 Step_3 8f1219d6aeb34ef1 +1 1455 1666648944848435419 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1455 1517 1666648944912437316 Step_3 8f1219d6aeb34ef1 +1 1559 1666664426417251287 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1808 1666664426669258917 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 2261 1666664427121272608 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1 2708 1666664427569286173 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +2708 2766 1666664427625287870 Step_3 8f1219d6aeb34ef1 +1 1201 1666664855330292737 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1419 1666664855550299446 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1746 1666664855874309329 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1 2139 1666664856270321406 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +2139 2198 1666664856326323113 Step_3 8f1219d6aeb34ef1 +1 3064 1666665293995695402 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 3119 1666665294267703724 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 3388 1666665294535711923 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1 3735 1666665294875722326 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +3735 3794 1666665294943724406 Step_3 8f1219d6aeb34ef1 +1 1799 1666669255676411244 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1800 1945 1666669255820415645 Step_3 8f1219d6aeb34ef1 +1 1683 1666669381468255802 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1934 1666669381716263380 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1934 1995 1666669381780265336 Step_3 8f1219d6aeb34ef1 +1 1782 1666670245222138954 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1782 1842 1666670245282140648 Step_3 8f1219d6aeb34ef1 +1 1740 1666670357709338457 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1740 1803 1666670357769340174 Step_3 8f1219d6aeb34ef1 +1 1699 1666670769113308892 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1699 1765 1666670769177310775 Step_3 8f1219d6aeb34ef1 +1 1651 1666671104203240905 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1651 1712 1666671104263242690 Step_3 8f1219d6aeb34ef1 +1 2106 1666671867478104093 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +2107 2210 1666671867578107099 Step_3 8f1219d6aeb34ef1 +1 1869 1666672425433732155 CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o 1c68ba16e6b4d09b +1869 1946 1666672425509733519 Step_3 8f1219d6aeb34ef1 +1 1689 1666672713715582664 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1689 1750 1666672713775583996 Step_3 8f1219d6aeb34ef1 +1 1420 1666673045983458070 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1420 1479 1666673046039459464 Step_3 8f1219d6aeb34ef1 +1 1556 1666673155706222015 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1556 1612 1666673155758223340 Step_3 8f1219d6aeb34ef1 +1 1544 1666673771998524489 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1544 1635 1666673772090526985 Step_3 8f1219d6aeb34ef1 +1 1444 1666673815375702044 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1444 1502 1666673815431703565 Step_3 8f1219d6aeb34ef1 +1 1473 1666673910682297456 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1473 1548 1666673910758299530 Step_3 8f1219d6aeb34ef1 +1 1454 1666673960391655087 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1454 1510 1666673960447656615 Step_3 8f1219d6aeb34ef1 +1 1133 1666674352668881415 CMakeFiles/Step_3.dir/src/engine/world.cpp.o 6470df278966c4 +1 1504 1666674353040901669 CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o 11f0e227e9fda9ca +1 1712 1666674353248912985 CMakeFiles/Step_3.dir/src/engine/main.cpp.o 641dce3f86933e2e +1712 1768 1666674353304916030 Step_3 8f1219d6aeb34ef1 diff --git a/Step 3/cmake-build-release/2022-10-24 17:15:44.png b/Step 3/cmake-build-release/2022-10-24 17:15:44.png new file mode 100644 index 0000000..3769e73 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:15:44.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:17:37.png b/Step 3/cmake-build-release/2022-10-24 17:17:37.png new file mode 100644 index 0000000..465de93 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:17:37.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:24:1.png b/Step 3/cmake-build-release/2022-10-24 17:24:1.png new file mode 100644 index 0000000..8a4cb0a Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:24:1.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:25:59.png b/Step 3/cmake-build-release/2022-10-24 17:25:59.png new file mode 100644 index 0000000..8ee65b5 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:25:59.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:27:0.png b/Step 3/cmake-build-release/2022-10-24 17:27:0.png new file mode 100644 index 0000000..a5e4332 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:27:0.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:32:1.png b/Step 3/cmake-build-release/2022-10-24 17:32:1.png new file mode 100644 index 0000000..c094f5a Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:32:1.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:33:45.png b/Step 3/cmake-build-release/2022-10-24 17:33:45.png new file mode 100644 index 0000000..54c9eed Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:33:45.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:34:38.png b/Step 3/cmake-build-release/2022-10-24 17:34:38.png new file mode 100644 index 0000000..2e73e97 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:34:38.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:35:43.png b/Step 3/cmake-build-release/2022-10-24 17:35:43.png new file mode 100644 index 0000000..ae80603 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:35:43.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:37:55.png b/Step 3/cmake-build-release/2022-10-24 17:37:55.png new file mode 100644 index 0000000..f331fea Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:37:55.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:46:48.png b/Step 3/cmake-build-release/2022-10-24 17:46:48.png new file mode 100644 index 0000000..50827dc Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:46:48.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:49:57.png b/Step 3/cmake-build-release/2022-10-24 17:49:57.png new file mode 100644 index 0000000..d1c67a0 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:49:57.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:55:30.png b/Step 3/cmake-build-release/2022-10-24 17:55:30.png new file mode 100644 index 0000000..d3862fc Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:55:30.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 17:56:29.png b/Step 3/cmake-build-release/2022-10-24 17:56:29.png new file mode 100644 index 0000000..19e8871 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 17:56:29.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 18:2:45.png b/Step 3/cmake-build-release/2022-10-24 18:2:45.png new file mode 100644 index 0000000..f35c979 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 18:2:45.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 22:22:0.png b/Step 3/cmake-build-release/2022-10-24 22:22:0.png new file mode 100644 index 0000000..b9874cf Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 22:22:0.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 22:29:11.png b/Step 3/cmake-build-release/2022-10-24 22:29:11.png new file mode 100644 index 0000000..3dd65a3 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 22:29:11.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 22:36:26.png b/Step 3/cmake-build-release/2022-10-24 22:36:26.png new file mode 100644 index 0000000..85d8a67 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 22:36:26.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 23:42:41.png b/Step 3/cmake-build-release/2022-10-24 23:42:41.png new file mode 100644 index 0000000..b24304c Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 23:42:41.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 23:43:24.png b/Step 3/cmake-build-release/2022-10-24 23:43:24.png new file mode 100644 index 0000000..e342a9e Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 23:43:24.png differ diff --git a/Step 3/cmake-build-release/2022-10-24 23:58:12.png b/Step 3/cmake-build-release/2022-10-24 23:58:12.png new file mode 100644 index 0000000..f9ecdab Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-24 23:58:12.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 0:0:52.png b/Step 3/cmake-build-release/2022-10-25 0:0:52.png new file mode 100644 index 0000000..3d15d4a Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 0:0:52.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 0:37:11.png b/Step 3/cmake-build-release/2022-10-25 0:37:11.png new file mode 100644 index 0000000..1fff17c Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 0:37:11.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 0:39:18.png b/Step 3/cmake-build-release/2022-10-25 0:39:18.png new file mode 100644 index 0000000..50734a3 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 0:39:18.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 0:40:23.png b/Step 3/cmake-build-release/2022-10-25 0:40:23.png new file mode 100644 index 0000000..356b842 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 0:40:23.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 0:7:42.png b/Step 3/cmake-build-release/2022-10-25 0:7:42.png new file mode 100644 index 0000000..0474237 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 0:7:42.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 1:0:6.png b/Step 3/cmake-build-release/2022-10-25 1:0:6.png new file mode 100644 index 0000000..729fb19 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 1:0:6.png differ diff --git a/Step 3/cmake-build-release/2022-10-25 1:2:27.png b/Step 3/cmake-build-release/2022-10-25 1:2:27.png new file mode 100644 index 0000000..cdc9ee2 Binary files /dev/null and b/Step 3/cmake-build-release/2022-10-25 1:2:27.png differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o index 87bb54b..5fbfc7d 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/image/image.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o index 7b730a7..9f09a35 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/main.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o index 704c30f..f8ad13d 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/raytracing.cpp.o differ diff --git a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o index 88aec7d..9f51af5 100644 Binary files a/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o and b/Step 3/cmake-build-release/CMakeFiles/Step_3.dir/src/engine/util/debug.cpp.o differ diff --git a/Step 3/cmake-build-release/Step_3 b/Step 3/cmake-build-release/Step_3 index d73c445..982da2f 100755 Binary files a/Step 3/cmake-build-release/Step_3 and b/Step 3/cmake-build-release/Step_3 differ diff --git a/Step 3/cmake-build-release/Testing/Temporary/LastTest.log b/Step 3/cmake-build-release/Testing/Temporary/LastTest.log index 7fdffff..d1bef3b 100644 --- a/Step 3/cmake-build-release/Testing/Temporary/LastTest.log +++ b/Step 3/cmake-build-release/Testing/Temporary/LastTest.log @@ -1,3 +1,3 @@ -Start testing: Oct 24 17:04 EDT +Start testing: Oct 25 01:05 EDT ---------------------------------------------------------- -End testing: Oct 24 17:04 EDT +End testing: Oct 25 01:05 EDT diff --git a/Step 3/include/engine/image/image.h b/Step 3/include/engine/image/image.h index 405800f..6ac7b20 100644 --- a/Step 3/include/engine/image/image.h +++ b/Step 3/include/engine/image/image.h @@ -14,19 +14,21 @@ namespace Raytracing { // glorified structure to store our image data. class Image { private: - int width; - int height; + unsigned long width; + unsigned long height; + unsigned long _width; + unsigned long _height; Vec4 *pixelData; public: - Image(int width, int height); + Image(unsigned long width, unsigned long height); Image(const Image &image); Image(const Image&& image) = delete; - inline void setPixelColor(int x, int y, const Vec4 &color) { + inline void setPixelColor(unsigned long x, unsigned long y, const Vec4 &color) { pixelData[(x * height) + y] = color; } - [[nodiscard]] inline Vec4 getPixelColor(int x, int y) const { + [[nodiscard]] inline Vec4 getPixelColor(unsigned long x, unsigned long y) const { return pixelData[(x * height) + y]; } @@ -35,9 +37,9 @@ namespace Raytracing { [[nodiscard]] int getPixelB(int x, int y) const; [[nodiscard]] int getPixelA(int x, int y) const; - [[nodiscard]] inline int getWidth() const { return width; } + [[nodiscard]] inline int getWidth() const { return int(width); } - [[nodiscard]] inline int getHeight() const { return height; } + [[nodiscard]] inline int getHeight() const { return int(height); } ~Image(); }; diff --git a/Step 3/include/engine/raytracing.h b/Step 3/include/engine/raytracing.h index cb6fb3c..e236b71 100644 --- a/Step 3/include/engine/raytracing.h +++ b/Step 3/include/engine/raytracing.h @@ -16,6 +16,7 @@ #include <utility> #include <mutex> #include <thread> +#include <queue> namespace Raytracing { @@ -90,6 +91,7 @@ namespace Raytracing { // yes this is actually the only sync we need between the threads // and compared to the actual runtime of the raytracing it's very small! std::mutex queueSync; + std::queue<std::vector<int>>* unprocessedQuads = new std::queue<std::vector<int>>(); Vec4 raycast(const Ray& ray, int depth); public: @@ -127,6 +129,7 @@ namespace Raytracing { } catch (std::exception& e){} delete(p); } + delete(unprocessedQuads); } }; diff --git a/Step 3/include/engine/util/debug.h b/Step 3/include/engine/util/debug.h index 4950ebc..2c3b692 100644 --- a/Step 3/include/engine/util/debug.h +++ b/Step 3/include/engine/util/debug.h @@ -39,9 +39,14 @@ namespace Raytracing { void start(); void start(const std::string& name); static void start(const std::string& name, const std::string& tabName) { - auto p = new profiler(name); - profiles.insert(std::pair(name, p)); - p->start(tabName); + if (profiles.contains(name)) { + auto p = profiles.at(name); + p->start(tabName); + } else { + auto p = new profiler(name); + profiles.insert(std::pair(name, p)); + p->start(tabName); + } } void end(); diff --git a/Step 3/src/engine/image/image.cpp b/Step 3/src/engine/image/image.cpp index 18c1905..8b84aba 100644 --- a/Step 3/src/engine/image/image.cpp +++ b/Step 3/src/engine/image/image.cpp @@ -10,12 +10,12 @@ namespace Raytracing { - Image::Image(int width, int height) : width(width), height(height) { - pixelData = new Vec4[width * height]; + Image::Image(unsigned long width, unsigned long height) : width(width), height(height), _width(width-1), _height(height-1) { + pixelData = new Vec4[(width + 1) * (height + 1)]; } - Image::Image(const Image& image) : width(image.width), height(image.height) { - pixelData = new Vec4[image.width * image.height]; + Image::Image(const Image& image) : width(image.width), height(image.height), _width(image._width), _height(image._height) { + pixelData = new Vec4[(image.width + 1) * (image.height + 1)]; for (int i = 0; i < image.width; i++) { for (int j = 0; j < image.height; j++) { this->setPixelColor(i, j, image.pixelData[i * image.height + j]); @@ -51,7 +51,7 @@ namespace Raytracing { if (!lowerExtension.ends_with("hdr")) { // unfortunately we do have to put the data into a format that STB can read - unsigned char data[image.getWidth() * image.getHeight() * 3]; + auto* data = new unsigned char[(unsigned long)(image.getWidth()) * (unsigned long)image.getHeight() * 3]; int pixelIndex = 0; for (int j = image.getHeight()-1; j >= 0; j--) { for (int i = 0; i < image.getWidth(); i++) { @@ -75,9 +75,10 @@ namespace Raytracing { stbi_write_jpg(fullFile.c_str(), image.getWidth(), image.getHeight(), 3, data, 90); } else throw std::runtime_error("Invalid format! Please use bmp, png, or jpg"); + delete[](data); } else { // the TODO: here is to check if HDR is in [0,1] or if we need to transform the value. - float data[image.getWidth() * image.getHeight() * 3]; + auto* data = new float[image.getWidth() * image.getHeight() * 3]; int pixelIndex = 0; for (int i = 0; i < image.getWidth(); i++) { for (int j = 0; j < image.getHeight(); j++) { @@ -87,6 +88,7 @@ namespace Raytracing { } } stbi_write_hdr(fullFile.c_str(), image.getWidth(), image.getHeight(), 3, data); + delete[](data); } } } \ No newline at end of file diff --git a/Step 3/src/engine/main.cpp b/Step 3/src/engine/main.cpp index 0219275..7753295 100644 --- a/Step 3/src/engine/main.cpp +++ b/Step 3/src/engine/main.cpp @@ -54,9 +54,9 @@ int main(int argc, char** args) { parser.addOption("--format", "Output Format\n" "\tSets the output format to BMP, PNG, or JPEG. \n", "PNG"); parser.addOption("-w", "Image Width\n" - "\tSets the width of the output image.\n", "910"); + "\tSets the width of the output image.\n", "1440"); parser.addOption("-h", "Image Height\n" - "\tSets the height of the output image.\n", "512"); + "\tSets the height of the output image.\n", "720"); parser.addOption("--fov", "Camera FOV\n" "\tSets the FOV used to render the camera.\n", "90"); parser.addOption("--resources", "Resources Directory\n" @@ -74,8 +74,8 @@ int main(int argc, char** args) { // not perfect (contains duplicates) but good enough. parser.printAllInInfo(); - //Raytracing::Image image(1920, 1080); - Raytracing::Image image(std::stoi(parser.getOptionValue("-w")), std::stoi(parser.getOptionValue("-h"))); + Raytracing::Image image(1440, 720); + //Raytracing::Image image(std::stoi(parser.getOptionValue("-w")), std::stoi(parser.getOptionValue("-h"))); Raytracing::Camera camera(std::stoi(parser.getOptionValue("--fov")), image); //camera.setPosition({0, 0, 1}); @@ -132,6 +132,8 @@ int main(int argc, char** args) { raycaster.join(); } + profiler::print("Raytracer Results"); + Raytracing::ImageOutput imageOutput(image); auto t = std::time(nullptr); diff --git a/Step 3/src/engine/raytracing.cpp b/Step 3/src/engine/raytracing.cpp index 9c0201f..527d2de 100644 --- a/Step 3/src/engine/raytracing.cpp +++ b/Step 3/src/engine/raytracing.cpp @@ -33,8 +33,10 @@ namespace Raytracing { void Camera::setRotation(const PRECISION_TYPE yaw, const PRECISION_TYPE pitch, const PRECISION_TYPE roll) { // TODO: } - - Vec4 Raycaster::raycast(const Ray& ray, int depth) { + /* + * + *Vec4 Raycaster::raycast(const Ray& ray, int depth) { + if (depth > maxBounceDepth) return {0, 0, 0}; @@ -53,8 +55,64 @@ namespace Raytracing { // skybox color return {0.5, 0.7, 1.0}; } + */ + + struct RayData { + Ray ray; + int depth; + Vec4 color; + }; + + Vec4 Raycaster::raycast(const Ray& ray, int depth) { + auto* rayQueue = new std::queue<Ray>(); + rayQueue->push(ray); + Vec4 color {1.0, 1.0, 1.0}; + int currentDepth = 0; + do { + Ray r = rayQueue->front(); + + auto hit = world.checkIfHit(r, 0.001, infinity); + if (hit.first.hit) { + auto object = hit.second; + auto scatterResults = object->getMaterial()->scatter(r, hit.first); + // if the material scatters the ray, ie casts a new one, + if (scatterResults.scattered) { // attenuate the recursive raycast by the material's color + color = scatterResults.attenuationColor * color; + rayQueue->push(scatterResults.newRay); + } + } else { + color = color * Vec4{0.5, 0.7, 1.0}; + rayQueue->pop(); + break; + } + rayQueue->pop(); + currentDepth++; + //tlog << currentDepth << " " << rayQueue->size() << "\n"; + } while (currentDepth < maxBounceDepth && !rayQueue->empty()); + delete(rayQueue); + return color; + /*if (depth > maxBounceDepth) + return {0, 0, 0}; + + auto hit = world.checkIfHit(ray, 0.001, infinity); + + if (hit.first.hit) { + auto object = hit.second; + auto scatterResults = object->getMaterial()->scatter(ray, hit.first); + // if the material scatters the ray, ie casts a new one, + if (scatterResults.scattered) // attenuate the recursive raycast by the material's color + return scatterResults.attenuationColor * raycast(scatterResults.newRay, depth + 1); + //tlog << "Not scattered? " << object->getMaterial() << "\n"; + return {0, 0, 0}; + } + + // skybox color + return {0.5, 0.7, 1.0};*/ + } + void Raycaster::runSingle() { executors.push_back(new std::thread([this]() -> void { + profiler::start("Raytracer Results", "Single Thread"); for (int i = 0; i < image.getWidth(); i++) { for (int j = 0; j < image.getHeight(); j++) { Raytracing::Vec4 color; @@ -68,6 +126,7 @@ namespace Raytracing { image.setPixelColor(i, j, {std::sqrt(sf * color.r()), std::sqrt(sf * color.g()), std::sqrt(sf * color.b())}); } } + profiler::end("Raytracer Results", "Single Thread"); finishedThreads++; })); } @@ -79,36 +138,31 @@ namespace Raytracing { // matching the 16 threads. if (t == 0) t = system_threads; - auto divs = (double) int(std::log(t) / std::log(2)); + int divs = int(std::log(t) / std::log(2)); // now double the divs, splitting each quadrant into 4 sub-quadrants which we can queue // the reason to do this is that some of them will finish before others, and the now free threads can keep working // do it without a queue like this leads to a single thread critical path and isn't optimally efficient. - divs *= 2; // 2 because two axis getting split makes 4 sub-quadrants - auto* unprocessedQuads = new std::queue<std::vector<int>>(); - //auto* queue = new basic_queue{}; + divs *= 4; // 2 because two axis getting split makes 4 sub-quadrants, but I tested 4, and it was faster by two seconds, so I'm keeping 4. for (int dx = 0; dx < divs; dx++) { for (int dy = 0; dy < divs; dy++) { - // sending functions wasn't working. + // sending functions wasn't working. (fixed, however it feels janky sending lambda functions w/ captures) unprocessedQuads->push({ - int(std::ceil(image.getWidth() / divs)), - int(std::ceil(image.getHeight() / divs)), - int(std::floor(image.getWidth() / divs) * dx), - int(std::floor(image.getHeight() / divs) * dy) - + image.getWidth() / divs, + image.getHeight() / divs, + (image.getWidth() / divs) * dx, + (image.getHeight() / divs) * dy }); } } - profiler profile("Multithreading Raytracer Results"); for (int i = 0; i < t; i++) { - executors.push_back(new std::thread([this, &unprocessedQuads, &profile, i, divs, t]() -> void { + executors.push_back(new std::thread([this, i, divs, t]() -> void { // run through all the quadrants -// std::stringstream str; -// str << "Threading of #"; -// str << i; -// tlog << str.str() << "\n"; -// profile.start(str.str()); + std::stringstream str; + str << "Threading of #"; + str << (i+1); + profiler::start("Raytracer Results", str.str()); int j = 0; while (true) { std::vector<int> func; @@ -121,7 +175,7 @@ namespace Raytracing { func = unprocessedQuads->front(); unprocessedQuads->pop(); queueSync.unlock(); - // then run it + // the run it for (int kx = 0; kx <= func[0]; kx++) { for (int ky = 0; ky < func[1]; ky++) { try { @@ -145,10 +199,7 @@ namespace Raytracing { j++; } finishedThreads++; -// profile.end(str.str()); -// -// if (finishedThreads == executors.size()-1) -// profile.print(); + profiler::end("Raytracer Results", str.str()); })); } } diff --git a/Step 3/src/engine/util/debug.cpp b/Step 3/src/engine/util/debug.cpp index cd4fa08..e19d606 100644 --- a/Step 3/src/engine/util/debug.cpp +++ b/Step 3/src/engine/util/debug.cpp @@ -32,9 +32,13 @@ namespace Raytracing { void profiler::print() { ilog << "Profiler " << name << " recorded: \n"; + double totalTime = 0; for (std::pair<std::string, std::pair<long, long>> e : timings){ - ilog << "\t" << e.first << " took " << ((double)(e.second.second - e.second.first) / 1000000.0) << "ms to run!\n"; + double time = ((double)(e.second.second - e.second.first) / 1000000.0); + ilog << "\t" << e.first << " took " << time << "ms to run!\n"; + totalTime += time; } + ilog << "\t\tIn total it took " << totalTime << "ms to run!\n"; }