Skip to content

Commit

Permalink
test water cornellbox
Browse files Browse the repository at this point in the history
  • Loading branch information
yumcyaWiz committed Nov 21, 2021
1 parent 888716c commit 8b740d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 4 additions & 9 deletions examples/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <omp.h>

#include "camera.h"
#include "image.h"
#include "integrator.h"
Expand All @@ -10,21 +8,18 @@ int main() {
const int width = 512;
const int height = 512;
const int n_samples = 100;
const int n_photons = 1000000;
const int n_photons = 10000;
const int n_estimation_global = 100;
const float n_photons_caustics_multiplier = 1;
const float n_photons_caustics_multiplier = 100;
const int n_estimation_caustics = 100;
const bool final_gathering = true;
const int max_depth = 100;
const Vec3f camPos(0, 1, 7);
const Vec3f lookAt(0, 1, 0);

Image image(width, height);

const Camera camera(camPos, normalize(lookAt - camPos), 0.25 * PI);
Camera camera(Vec3f(0, 1, 6), Vec3f(0, 0, -1), 0.25 * PI);

Scene scene;
scene.loadModel("CornellBox-Original.obj");
scene.loadModel("CornellBox-Water.obj");
scene.build();

// photon tracing and build photon map
Expand Down
6 changes: 3 additions & 3 deletions tests/test_path_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
int main() {
const int width = 512;
const int height = 512;
const int n_samples = 100;
const int n_samples = 10000;
const int max_depth = 100;

Image image(width, height);
Camera camera(Vec3f(0, 1, 7), Vec3f(0, 0, -1), 0.25 * PI);
Camera camera(Vec3f(0, 1, 6), Vec3f(0, 0, -1), 0.25 * PI);

Scene scene;
scene.loadModel("CornellBox-Original.obj");
scene.loadModel("CornellBox-Water.obj");
scene.build();

// photon tracing and build photon map
Expand Down

0 comments on commit 8b740d7

Please sign in to comment.