diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-16 16:02:08 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-16 21:08:09 +0300 |
commit | eef6e1cca16468d70166330c0f64fe202d619304 (patch) | |
tree | 16597838e392a4bfa96ad4015248d9e3f40dd9e6 | |
parent | 7a693626d63a52acd12e80209b634711154a2f9d (diff) |
StudioLight: Fix codestyle
-rw-r--r-- | source/blender/blenkernel/intern/studiolight.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index 5381d2be691..df5cc7551aa 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -442,106 +442,64 @@ static void studiolight_calculate_spherical_harmonics_coefficient(StudioLight *s switch (sh_component) { /* L0 */ case 0: - { coef = 0.2822095f; break; - } - /* L1 */ case 1: - { coef = -0.488603f * nz * 2.0f / 3.0f; break; - } case 2: - { coef = 0.488603f * ny * 2.0f / 3.0f; break; - } case 3: - { coef = -0.488603f * nx * 2.0f / 3.0f; break; - } - /* L2 */ case 4: - { coef = 1.092548f * nx * nz * 1.0f / 4.0f; break; - } case 5: - { coef = -1.092548f * nz * ny * 1.0f / 4.0f; break; - } case 6: - { coef = 0.315392f * (3.0f * ny2 - 1.0f) * 1.0f / 4.0f; break; - } case 7: - { coef = 1.092548f * nx * ny * 1.0f / 4.0f; break; - } case 8: - { coef = 0.546274f * (nx2 - nz2) * 1.0f / 4.0f; break; - } - /* L4 */ case 9: - { coef = (2.5033429417967046f * nx * nz * (nx2 - nz2)) / -24.0f; break; - } case 10: - { coef = (-1.7701307697799304f * nz * ny * (3.0f * nx2 - nz2)) / -24.0f; break; - } case 11: - { coef = (0.9461746957575601f * nz * nx * (-1.0f + 7.0f * ny2)) / -24.0f; break; - } case 12: - { coef = (-0.6690465435572892f * nz * ny * (-3.0f + 7.0f * ny2)) / -24.0f; break; - } case 13: - { coef = ((105.0f * ny4 - 90.0f * ny2 + 9.0f) / 28.359261614f) / -24.0f; break; - } case 14: - { coef = (-0.6690465435572892f * nx * ny * (-3.0f + 7.0f * ny2)) / -24.0f; break; - } case 15: - { coef = (0.9461746957575601f * (nx2 - nz2) * (-1.0f + 7.0f * ny2)) / -24.0f; break; - } case 16: - { coef = (-1.7701307697799304f * nx * ny * (nx2 - 3.0f * nz2)) / -24.0f; break; - } case 17: - { coef = (0.6258357354491761f * (nx4 - 6.0f * nz2 * nx2 + nz4)) / -24.0f; break; - } - default: - { coef = 0.0f; - } } madd_v3_v3fl(sh, color, coef * weight); |