Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/closure/bsdf.h
| Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Lines | default: | ||||
| label = LABEL_NONE; | label = LABEL_NONE; | ||||
| break; | break; | ||||
| } | } | ||||
| /* Test if BSDF sample should be treated as transparent for background. */ | /* Test if BSDF sample should be treated as transparent for background. */ | ||||
| if (label & LABEL_TRANSMIT) { | if (label & LABEL_TRANSMIT) { | ||||
| float threshold_squared = kernel_data.background.transparent_roughness_squared_threshold; | float threshold_squared = kernel_data.background.transparent_roughness_squared_threshold; | ||||
| if (threshold_squared >= 0.0f) { | if (threshold_squared >= 0.0f && !(label & LABEL_DIFFUSE)) { | ||||
| if (bsdf_get_specular_roughness_squared(sc) <= threshold_squared) { | if (bsdf_get_specular_roughness_squared(sc) <= threshold_squared) { | ||||
| label |= LABEL_TRANSMIT_TRANSPARENT; | label |= LABEL_TRANSMIT_TRANSPARENT; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* Shadow terminator offset. */ | /* Shadow terminator offset. */ | ||||
| const float frequency_multiplier = | const float frequency_multiplier = | ||||
| ▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines | |||||