-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from blacklab/karsten-furnace-test#22
Furnace test#22
- Loading branch information
Showing
11 changed files
with
172 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#include <catch.hpp> | ||
#include "../trace.h" | ||
|
||
SCENARIO("Create config from options", "[config]") { | ||
|
||
GIVEN("A a max depth") { | ||
long max_depth = 2; | ||
|
||
GIVEN("A shadow intensity") { | ||
float shadow_intensity = 1.0f; | ||
|
||
GIVEN("A number of pixel samples") { | ||
long num_pixel_samples = 128; | ||
|
||
GIVEN("A number of monte carlo samples") { | ||
long num_monte_carlo_samples = 2; | ||
|
||
GIVEN("A number of threads") { | ||
long num_threads = 4; | ||
|
||
GIVEN("A background color") { | ||
std::string bg_color = "0 0.3 1.0"; | ||
|
||
GIVEN("An inverse of gamma") { | ||
float inv_gamma = 1.f/2.2f; | ||
|
||
GIVEN("A gamma correction flag") { | ||
bool no_gamma = false; | ||
|
||
WHEN("the configuration is created") { | ||
Configuration config { max_depth | ||
, shadow_intensity | ||
, num_pixel_samples | ||
, num_monte_carlo_samples | ||
, num_threads | ||
, bg_color | ||
, inv_gamma | ||
, no_gamma | ||
}; | ||
|
||
THEN("the configuration holds all variables") { | ||
REQUIRE(config.max_depth == 2); | ||
REQUIRE(config.shadow_intensity - 1.0f < 0.00001f); | ||
REQUIRE(config.num_pixel_samples == 128); | ||
REQUIRE(config.num_monte_carlo_samples == 2); | ||
REQUIRE(config.num_threads == 4); | ||
REQUIRE(config.gamma_correction_enabled == true); | ||
REQUIRE(config.bg_color == Color(0.0f, 0.3f, 1.0f, 1.0f)); | ||
}}}}}}}}}} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "catch.hpp" | ||
#include <catch.hpp> | ||
#include "../lib/lambertian.h" | ||
|
||
#include <assimp/mesh.h> | ||
|
Oops, something went wrong.