Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-08-21 00:46:05 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-08-21 00:46:05 +0300
commit41e6068c76447e7c3b9c281f508eae03d3dea804 (patch)
tree99e01f6caddfb583d76a7a393a604ed776c86719 /intern/cycles/blender/blender_object.cpp
parent1d1ddd48db432eb9ff646297d559756668fe6843 (diff)
Revert "Cycles: remove square samples option."
This reverts commit 757c24b6bceaeeae95f743b72b6a7040880a0ebf. We'll revisit this when doing deeper sampling changes.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r--intern/cycles/blender/blender_object.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index 82623d538b2..a930c439370 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -162,11 +162,16 @@ void BlenderSync::sync_light(BL::Object& b_parent,
light->shader = used_shaders[0];
/* shadow */
+ PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles");
light->cast_shadow = get_boolean(clamp, "cast_shadow");
light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling");
- light->samples = get_int(clamp, "samples");
+ int samples = get_int(clamp, "samples");
+ if(get_boolean(cscene, "use_square_samples"))
+ light->samples = samples * samples;
+ else
+ light->samples = samples;
light->max_bounces = get_int(clamp, "max_bounces");
@@ -194,6 +199,7 @@ void BlenderSync::sync_background_light(bool use_portal)
BL::World b_world = b_scene.world();
if(b_world) {
+ PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
bool sample_as_light = get_boolean(cworld, "sample_as_light");
@@ -212,7 +218,11 @@ void BlenderSync::sync_background_light(bool use_portal)
light->use_mis = sample_as_light;
light->max_bounces = get_int(cworld, "max_bounces");
- light->samples = get_int(cworld, "samples");
+ int samples = get_int(cworld, "samples");
+ if(get_boolean(cscene, "use_square_samples"))
+ light->samples = samples * samples;
+ else
+ light->samples = samples;
light->tag_update(scene);
light_map.set_recalc(b_world);