@@ -1097,7 +1097,7 @@ def test01_rendering_primal(variants_all_ad_rgb, integrator_name, config):
10971097
10981098
10991099@pytest .mark .slow
1100- # @pytest.mark.skipif(os.name == 'nt', reason='Skip those memory heavy tests on Windows')
1100+ @pytest .mark .skipif (os .name == 'nt' , reason = 'Skip those memory heavy tests on Windows' )
11011101@pytest .mark .parametrize ('integrator_name, config' , CONFIGS )
11021102def test02_rendering_forward (variants_all_ad_rgb , integrator_name , config ):
11031103 if "volpath" in integrator_name and integrator_name != "prbvolpath" :
@@ -1153,16 +1153,10 @@ def test02_rendering_forward(variants_all_ad_rgb, integrator_name, config):
11531153 print (f"Success in config: { config .name } , { integrator_name } " )
11541154 print (f"-> error mean: { error_mean } (threshold={ config .error_mean_threshold } )" )
11551155 print (f"-> error max: { error_max } (threshold={ config .error_max_threshold } )" )
1156- # print(f'-> reference image: {pathlib.PurePath(filename)}')
1157- # filename = join(os.getcwd(), f"test_{integrator_name}_{config.name}_image_fwd.exr")
1158- # print(f'-> write current image: {pathlib.PurePath(filename)}')
1159- # mi.util.write_bitmap(filename, image_fwd)
1160- # filename = join(os.getcwd(), f"test_{integrator_name}_{config.name}_image_error.exr")
1161- # print(f'-> write error image: {pathlib.PurePath(filename)}')
11621156
11631157
11641158@pytest .mark .slow
1165- # @pytest.mark.skipif(os.name == 'nt', reason='Skip those memory heavy tests on Windows')
1159+ @pytest .mark .skipif (os .name == 'nt' , reason = 'Skip those memory heavy tests on Windows' )
11661160@pytest .mark .parametrize ('integrator_name, config' , CONFIGS )
11671161def test03_rendering_backward (variants_all_ad_rgb , integrator_name , config ):
11681162 if "volpath" in integrator_name and integrator_name != "prbvolpath" :
@@ -1217,7 +1211,7 @@ def test03_rendering_backward(variants_all_ad_rgb, integrator_name, config):
12171211
12181212@pytest .mark .skip
12191213@pytest .mark .slow
1220- # @pytest.mark.skipif(os.name == 'nt', reason='Skip those memory heavy tests on Windows')
1214+ @pytest .mark .skipif (os .name == 'nt' , reason = 'Skip those memory heavy tests on Windows' )
12211215def test04_render_custom_op (variants_all_ad_rgb ):
12221216 config = DiffuseAlbedoConfig ()
12231217 config .initialize ()
@@ -1361,11 +1355,14 @@ def test04_render_custom_op(variants_all_ad_rgb):
13611355
13621356 integrator_path = mi .load_dict ({
13631357 'type' : 'volpath' ,
1364- 'max_depth' : config .integrator_dict ['max_depth' ]
1358+ 'max_depth' : config .integrator_dict ['max_depth' ],
1359+ # Use unidirectional sampling for the forward renders, best way to
1360+ # eliminate any bugs in things like Next-Event Estimation
1361+ 'sampling_mode' : 1
13651362 })
13661363
13671364 # Primal render
1368- image_ref = integrator_path .render (config .scene , seed = 0 , spp = args .spp )
1365+ image_ref = integrator_path .render (config .scene , seed = 0 , spp = args .spp if args . spp > 1e5 else 192000 )
13691366
13701367 filename = join (output_dir , f"test_{ config .name } _image_primal_ref.exr" )
13711368 mi .util .write_bitmap (filename , image_ref )
@@ -1379,7 +1376,7 @@ def test04_render_custom_op(variants_all_ad_rgb):
13791376 theta = mi .Float (fd_step * config .ref_fd_epsilon )
13801377 config .update (theta )
13811378 # Accumulate final image in double precision to avoid truncation error/underflow
1382- image_1 = mi .TensorXd (integrator_path .render (config .scene , seed = 0 , spp = args .spp ))
1379+ image_1 = mi .TensorXd (integrator_path .render (config .scene , seed = 0 , spp = args .spp if args . spp > 1e5 else 192000 ))
13831380 dr .eval (image_1 )
13841381 if image_cumulative is not None :
13851382 image_cumulative = image_cumulative + fd_weight * image_1
0 commit comments