diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/gpu/intern/gpu_material.c | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index e676c0b33cd..a0fe77598f2 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -313,7 +313,7 @@ static float eval_profile(float r, short falloff_type, float sharpness, float pa { r = fabsf(r); - if (falloff_type == SHD_SUBSURFACE_BURLEY || falloff_type == SHD_SUBSURFACE_RANDOM_WALK) { + if (ELEM(falloff_type, SHD_SUBSURFACE_BURLEY, SHD_SUBSURFACE_RANDOM_WALK)) { return burley_profile(r, param) / BURLEY_TRUNCATE_CDF; } if (falloff_type == SHD_SUBSURFACE_CUBIC) { @@ -353,7 +353,7 @@ static void compute_sss_kernel( /* Christensen-Burley fitting */ float l[3], d[3]; - if (falloff_type == SHD_SUBSURFACE_BURLEY || falloff_type == SHD_SUBSURFACE_RANDOM_WALK) { + if (ELEM(falloff_type, SHD_SUBSURFACE_BURLEY, SHD_SUBSURFACE_RANDOM_WALK)) { mul_v3_v3fl(l, rad, 0.25f * M_1_PI); const float A = 1.0f; const float s = 1.9f - A + 3.5f * (A - 0.8f) * (A - 0.8f); |