diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-21 08:41:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-21 08:41:03 +0300 |
commit | 3e555d3d785b17bf9398d7666d5131c994da8c6b (patch) | |
tree | d15aaa353e31ed2acbd105d2b48ac4b1c99ea1e5 /intern/cycles/blender/blender_sync.cpp | |
parent | d007828ae78d66cdcc005d9ba3ad57e987f0190a (diff) | |
parent | 0033f0e161d984b38d3a36d18448f16baef121aa (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 47 |
1 files changed, 39 insertions, 8 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 423f781dc17..19d8044cd4a 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -294,13 +294,32 @@ void BlenderSync::sync_integrator() integrator->sample_all_lights_indirect = get_boolean(cscene, "sample_all_lights_indirect"); integrator->light_sampling_threshold = get_float(cscene, "light_sampling_threshold"); - integrator->diffuse_samples = get_int(cscene, "diffuse_samples"); - integrator->glossy_samples = get_int(cscene, "glossy_samples"); - integrator->transmission_samples = get_int(cscene, "transmission_samples"); - integrator->ao_samples = get_int(cscene, "ao_samples"); - integrator->mesh_light_samples = get_int(cscene, "mesh_light_samples"); - integrator->subsurface_samples = get_int(cscene, "subsurface_samples"); - integrator->volume_samples = get_int(cscene, "volume_samples"); + int diffuse_samples = get_int(cscene, "diffuse_samples"); + int glossy_samples = get_int(cscene, "glossy_samples"); + int transmission_samples = get_int(cscene, "transmission_samples"); + int ao_samples = get_int(cscene, "ao_samples"); + int mesh_light_samples = get_int(cscene, "mesh_light_samples"); + int subsurface_samples = get_int(cscene, "subsurface_samples"); + int volume_samples = get_int(cscene, "volume_samples"); + + if(get_boolean(cscene, "use_square_samples")) { + integrator->diffuse_samples = diffuse_samples * diffuse_samples; + integrator->glossy_samples = glossy_samples * glossy_samples; + integrator->transmission_samples = transmission_samples * transmission_samples; + integrator->ao_samples = ao_samples * ao_samples; + integrator->mesh_light_samples = mesh_light_samples * mesh_light_samples; + integrator->subsurface_samples = subsurface_samples * subsurface_samples; + integrator->volume_samples = volume_samples * volume_samples; + } + else { + integrator->diffuse_samples = diffuse_samples; + integrator->glossy_samples = glossy_samples; + integrator->transmission_samples = transmission_samples; + integrator->ao_samples = ao_samples; + integrator->mesh_light_samples = mesh_light_samples; + integrator->subsurface_samples = subsurface_samples; + integrator->volume_samples = volume_samples; + } if(b_scene.render().use_simplify()) { if(preview) { @@ -400,7 +419,11 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D& b_v3d, const char *layer) render_layer.bound_samples = (use_layer_samples == 1); if(use_layer_samples != 2) { - render_layer.samples = b_rlay->samples(); + int samples = b_rlay->samples(); + if(get_boolean(cscene, "use_square_samples")) + render_layer.samples = samples * samples; + else + render_layer.samples = samples; } } @@ -715,6 +738,14 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, int preview_samples = get_int(cscene, "preview_samples"); int preview_aa_samples = get_int(cscene, "preview_aa_samples"); + if(get_boolean(cscene, "use_square_samples")) { + aa_samples = aa_samples * aa_samples; + preview_aa_samples = preview_aa_samples * preview_aa_samples; + + samples = samples * samples; + preview_samples = preview_samples * preview_samples; + } + if(get_enum(cscene, "progressive") == 0) { if(background) { params.samples = aa_samples; |