Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/scene/shader.cpp
| Show First 20 Lines • Show All 343 Lines • ▼ Show 20 Lines | void Shader::estimate_emission() | ||||
| foreach (ShaderNode *node, graph->nodes) { | foreach (ShaderNode *node, graph->nodes) { | ||||
| if (node->special_type == SHADER_SPECIAL_TYPE_OUTPUT_AOV) { | if (node->special_type == SHADER_SPECIAL_TYPE_OUTPUT_AOV) { | ||||
| emission_is_constant = false; | emission_is_constant = false; | ||||
| } | } | ||||
| } | } | ||||
| ShaderInput *surf = graph->output()->input("Surface"); | ShaderInput *surf = graph->output()->input("Surface"); | ||||
| emission_estimate = output_estimate_emission(surf->link, emission_is_constant); | emission_estimate = fabs(output_estimate_emission(surf->link, emission_is_constant)); | ||||
| if (is_zero(emission_estimate)) { | if (is_zero(emission_estimate)) { | ||||
| emission_sampling = EMISSION_SAMPLING_NONE; | emission_sampling = EMISSION_SAMPLING_NONE; | ||||
| } | } | ||||
| else if (emission_sampling_method == EMISSION_SAMPLING_AUTO) { | else if (emission_sampling_method == EMISSION_SAMPLING_AUTO) { | ||||
| /* Automatically disable MIS when emission is low, to avoid weakly emitting | /* Automatically disable MIS when emission is low, to avoid weakly emitting | ||||
| * using a lot of memory in the light tree and potentially wasting samples | * using a lot of memory in the light tree and potentially wasting samples | ||||
| * where indirect light samples are sufficient. | * where indirect light samples are sufficient. | ||||
| ▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines | |||||