Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/kernel_subsurface.h
| Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | if(hit) { | ||||
| sd->flag |= bsdf_diffuse_setup(sc); | sd->flag |= bsdf_diffuse_setup(sc); | ||||
| /* replace CLOSURE_BSDF_DIFFUSE_ID with this special ID so render passes | /* replace CLOSURE_BSDF_DIFFUSE_ID with this special ID so render passes | ||||
| * can recognize it as not being a regular diffuse closure */ | * can recognize it as not being a regular diffuse closure */ | ||||
| sc->type = CLOSURE_BSDF_BSSRDF_ID; | sc->type = CLOSURE_BSDF_BSSRDF_ID; | ||||
| } | } | ||||
| else | else | ||||
| sd->num_closure = 0; | sd->num_closure = 0; | ||||
| kernel_assert(sd->num_closure <= MAX_BSSRDF_CLOSURE); | |||||
| } | } | ||||
| /* optionally do blurring of color and/or bump mapping, at the cost of a shader evaluation */ | /* optionally do blurring of color and/or bump mapping, at the cost of a shader evaluation */ | ||||
| ccl_device float3 subsurface_color_pow(float3 color, float exponent) | ccl_device float3 subsurface_color_pow(float3 color, float exponent) | ||||
| { | { | ||||
| color = max(color, make_float3(0.0f, 0.0f, 0.0f)); | color = max(color, make_float3(0.0f, 0.0f, 0.0f)); | ||||
| if(exponent == 1.0f) { | if(exponent == 1.0f) { | ||||
| ▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines | |||||