Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/integrator.cpp
| Show All 25 Lines | |||||
| #include "util/util_hash.h" | #include "util/util_hash.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| NODE_DEFINE(Integrator) | NODE_DEFINE(Integrator) | ||||
| { | { | ||||
| NodeType *type = NodeType::add("integrator", create); | NodeType *type = NodeType::add("integrator", create); | ||||
| SOCKET_INT(min_bounce, "Min Bounce", 2); | |||||
| SOCKET_INT(max_bounce, "Max Bounce", 7); | SOCKET_INT(max_bounce, "Max Bounce", 7); | ||||
| SOCKET_INT(max_diffuse_bounce, "Max Diffuse Bounce", 7); | SOCKET_INT(max_diffuse_bounce, "Max Diffuse Bounce", 7); | ||||
| SOCKET_INT(max_glossy_bounce, "Max Glossy Bounce", 7); | SOCKET_INT(max_glossy_bounce, "Max Glossy Bounce", 7); | ||||
| SOCKET_INT(max_transmission_bounce, "Max Transmission Bounce", 7); | SOCKET_INT(max_transmission_bounce, "Max Transmission Bounce", 7); | ||||
| SOCKET_INT(max_volume_bounce, "Max Volume Bounce", 7); | SOCKET_INT(max_volume_bounce, "Max Volume Bounce", 7); | ||||
| SOCKET_INT(transparent_min_bounce, "Transparent Min Bounce", 2); | |||||
| SOCKET_INT(transparent_max_bounce, "Transparent Max Bounce", 7); | SOCKET_INT(transparent_max_bounce, "Transparent Max Bounce", 7); | ||||
| SOCKET_BOOLEAN(transparent_shadows, "Transparent Shadows", false); | SOCKET_BOOLEAN(transparent_shadows, "Transparent Shadows", false); | ||||
| SOCKET_INT(ao_bounces, "AO Bounces", 0); | SOCKET_INT(ao_bounces, "AO Bounces", 0); | ||||
| SOCKET_INT(volume_max_steps, "Volume Max Steps", 1024); | SOCKET_INT(volume_max_steps, "Volume Max Steps", 1024); | ||||
| SOCKET_FLOAT(volume_step_size, "Volume Step Size", 0.1f); | SOCKET_FLOAT(volume_step_size, "Volume Step Size", 0.1f); | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | if(!need_update) | ||||
| return; | return; | ||||
| device_free(device, dscene); | device_free(device, dscene); | ||||
| KernelIntegrator *kintegrator = &dscene->data.integrator; | KernelIntegrator *kintegrator = &dscene->data.integrator; | ||||
| /* integrator parameters */ | /* integrator parameters */ | ||||
| kintegrator->max_bounce = max_bounce + 1; | kintegrator->max_bounce = max_bounce + 1; | ||||
| kintegrator->min_bounce = min_bounce + 1; | |||||
| kintegrator->max_diffuse_bounce = max_diffuse_bounce + 1; | kintegrator->max_diffuse_bounce = max_diffuse_bounce + 1; | ||||
| kintegrator->max_glossy_bounce = max_glossy_bounce + 1; | kintegrator->max_glossy_bounce = max_glossy_bounce + 1; | ||||
| kintegrator->max_transmission_bounce = max_transmission_bounce + 1; | kintegrator->max_transmission_bounce = max_transmission_bounce + 1; | ||||
| kintegrator->max_volume_bounce = max_volume_bounce + 1; | kintegrator->max_volume_bounce = max_volume_bounce + 1; | ||||
| kintegrator->transparent_max_bounce = transparent_max_bounce + 1; | kintegrator->transparent_max_bounce = transparent_max_bounce + 1; | ||||
| kintegrator->transparent_min_bounce = transparent_min_bounce + 1; | |||||
| if(ao_bounces == 0) { | if(ao_bounces == 0) { | ||||
| kintegrator->ao_bounces = INT_MAX; | kintegrator->ao_bounces = INT_MAX; | ||||
| } | } | ||||
| else { | else { | ||||
| kintegrator->ao_bounces = ao_bounces - 1; | kintegrator->ao_bounces = ao_bounces - 1; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines | |||||