Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/closure/bsdf_hair.h
| Show All 28 Lines | ccl_device int bsdf_hair_reflection_setup(ccl_private HairBsdf *bsdf) | ||||
| return SD_BSDF | SD_BSDF_HAS_EVAL; | return SD_BSDF | SD_BSDF_HAS_EVAL; | ||||
| } | } | ||||
| ccl_device int bsdf_hair_transmission_setup(ccl_private HairBsdf *bsdf) | ccl_device int bsdf_hair_transmission_setup(ccl_private HairBsdf *bsdf) | ||||
| { | { | ||||
| bsdf->type = CLOSURE_BSDF_HAIR_TRANSMISSION_ID; | bsdf->type = CLOSURE_BSDF_HAIR_TRANSMISSION_ID; | ||||
| bsdf->roughness1 = clamp(bsdf->roughness1, 0.001f, 1.0f); | bsdf->roughness1 = clamp(bsdf->roughness1, 0.001f, 1.0f); | ||||
| bsdf->roughness2 = clamp(bsdf->roughness2, 0.001f, 1.0f); | bsdf->roughness2 = clamp(bsdf->roughness2, 0.001f, 1.0f); | ||||
| return SD_BSDF | SD_BSDF_HAS_EVAL; | return SD_BSDF | SD_BSDF_HAS_EVAL | SD_BSDF_HAS_TRANSMISSION; | ||||
| } | } | ||||
| ccl_device Spectrum bsdf_hair_reflection_eval(ccl_private const ShaderClosure *sc, | ccl_device Spectrum bsdf_hair_reflection_eval(ccl_private const ShaderClosure *sc, | ||||
| const float3 I, | const float3 I, | ||||
| const float3 omega_in, | const float3 omega_in, | ||||
| ccl_private float *pdf) | ccl_private float *pdf) | ||||
| { | { | ||||
| ccl_private const HairBsdf *bsdf = (ccl_private const HairBsdf *)sc; | ccl_private const HairBsdf *bsdf = (ccl_private const HairBsdf *)sc; | ||||
| ▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines | |||||