Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/integrator/shade_surface.h
| Show First 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | #endif | ||||
| // Save memory by storing the light and object indices in the shadow_isect | // Save memory by storing the light and object indices in the shadow_isect | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, object) = ray.self.object; | INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, object) = ray.self.object; | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, prim) = ray.self.prim; | INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 0, prim) = ray.self.prim; | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, object) = ray.self.light_object; | INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, object) = ray.self.light_object; | ||||
| INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, prim) = ray.self.light_prim; | INTEGRATOR_STATE_ARRAY_WRITE(shadow_state, shadow_isect, 1, prim) = ray.self.light_prim; | ||||
| /* Copy state from main path to shadow path. */ | /* Copy state from main path to shadow path. */ | ||||
| uint32_t shadow_flag = INTEGRATOR_STATE(state, path, flag); | uint32_t shadow_flag = INTEGRATOR_STATE(state, path, flag); | ||||
| shadow_flag |= (is_light) ? PATH_RAY_SHADOW_FOR_LIGHT : 0; | |||||
| const Spectrum unlit_throughput = INTEGRATOR_STATE(state, path, throughput); | const Spectrum unlit_throughput = INTEGRATOR_STATE(state, path, throughput); | ||||
| const Spectrum throughput = unlit_throughput * bsdf_eval_sum(&bsdf_eval); | const Spectrum throughput = unlit_throughput * bsdf_eval_sum(&bsdf_eval); | ||||
| if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { | if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { | ||||
| PackedSpectrum pass_diffuse_weight; | PackedSpectrum pass_diffuse_weight; | ||||
| PackedSpectrum pass_glossy_weight; | PackedSpectrum pass_glossy_weight; | ||||
| if (shadow_flag & PATH_RAY_ANY_PASS) { | if (shadow_flag & PATH_RAY_ANY_PASS) { | ||||
| ▲ Show 20 Lines • Show All 473 Lines • Show Last 20 Lines | |||||