Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_bake.h
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | #endif | ||||
| color = ensure_finite3(color); | color = ensure_finite3(color); | ||||
| /* Write output. */ | /* Write output. */ | ||||
| output[offset * 3 + 0] += color.x; | output[offset * 3 + 0] += color.x; | ||||
| output[offset * 3 + 1] += color.y; | output[offset * 3 + 1] += color.y; | ||||
| output[offset * 3 + 2] += color.z; | output[offset * 3 + 2] += color.z; | ||||
| } | } | ||||
| ccl_device void kernel_curve_shadow_transparency_evaluate( | |||||
| ccl_global const KernelGlobals *kg, | |||||
| ccl_global const KernelShaderEvalInput *input, | |||||
| ccl_global float *output, | |||||
| const int offset) | |||||
| { | |||||
| /* Setup shader data. */ | |||||
| const KernelShaderEvalInput in = input[offset]; | |||||
| ShaderData sd; | |||||
| shader_setup_from_curve(kg, &sd, in.object, in.prim, __float_as_int(in.v), in.u); | |||||
| /* Evaluate transparency. */ | |||||
| shader_eval_surface<KERNEL_FEATURE_NODE_MASK_SURFACE_SHADOW>( | |||||
| INTEGRATOR_STATE_PASS_NULL, &sd, NULL, PATH_RAY_SHADOW); | |||||
| /* Write output. */ | |||||
| output[offset] = clamp(average(shader_bsdf_transparency(kg, &sd)), 0.0f, 1.0f); | |||||
| } | |||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||