Added the delta-tooling
This commit is contained in:
1 parent
cc70cea7f6
commit
a3f62301f4
5 files changed
+470
-10
No files matched your search
@@ -120,6 +120,41 @@ fn example_scene_on_gpu_and_cpu() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn noiseless_renders_do_not_depend_on_the_seed() {
|
||||
let render = |seed: &str, noiseless: bool| {
|
||||
let out = out_dir().join(format!("noiseless-{seed}-{noiseless}.png"));
|
||||
let mut args = vec![
|
||||
"render",
|
||||
"--scene",
|
||||
"examples/scenes/boxwing.toml",
|
||||
"--adapter",
|
||||
"gpu",
|
||||
"--camera",
|
||||
"C1",
|
||||
"--seed",
|
||||
seed,
|
||||
"--out",
|
||||
out.to_str().unwrap(),
|
||||
];
|
||||
if noiseless {
|
||||
args.push("--noiseless");
|
||||
}
|
||||
let result = resolved(&args);
|
||||
assert!(
|
||||
result.status.success(),
|
||||
"{}",
|
||||
String::from_utf8_lossy(&result.stderr)
|
||||
);
|
||||
image::open(&out).unwrap().into_rgb16()
|
||||
};
|
||||
assert_ne!(render("1", false), render("2", false));
|
||||
let quiet = render("1", true);
|
||||
assert_eq!(quiet, render("2", true));
|
||||
// Empty space reads exactly the bias, with no dark current or read noise.
|
||||
assert_eq!(quiet.get_pixel(0, 0).0, [64 << 4; 3]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pretty_previews_lift_the_darks_and_leave_space_black() {
|
||||
let preview = |pretty: bool| {
|
||||
|
||||
Reference in new issue
Block a user