From 643370b10f0e1d732710525b8b231fa8403592a9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Jun 2018 20:58:08 +0200 Subject: Cleanup: code-style --- source/blender/blenkernel/intern/studiolight.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel/intern/studiolight.c') diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c index 20192cc269b..b64feef5528 100644 --- a/source/blender/blenkernel/intern/studiolight.c +++ b/source/blender/blenkernel/intern/studiolight.c @@ -368,18 +368,17 @@ static void studiolight_calculate_cubemap_vector_weight(float normal[3], float * }; mul_m3_v3(conversion_matrices[face], normal); normalize_v3(normal); - const float halfpix = 1.0f / (2.0f* STUDIOLIGHT_RADIANCE_CUBEMAP_SIZE); + const float halfpix = 1.0f / (2.0f * STUDIOLIGHT_RADIANCE_CUBEMAP_SIZE); *weight = studiolight_texel_solid_angle(x + halfpix, y + halfpix, halfpix); } static void studiolight_calculate_spherical_harmonics_coefficient(StudioLight *sl, int sh_component) { const float M_4PI = M_PI * 4.0f; - + float weight_accum = 0.0f; float sh[3] = {0.0f, 0.0f, 0.0f}; - for (int face = 0; face < 6; face++) - { + for (int face = 0; face < 6; face++) { float *color; color = sl->radiance_cubemap_buffers[face]->rect_float; for (int y = 0; y < STUDIOLIGHT_RADIANCE_CUBEMAP_SIZE; y++) { @@ -389,7 +388,7 @@ static void studiolight_calculate_spherical_harmonics_coefficient(StudioLight *s float weight, coef; float cubevec[3]; studiolight_calculate_cubemap_vector_weight(cubevec, &weight, face, xf, yf); - + switch (sh_component) { case 0: { @@ -847,7 +846,7 @@ void BKE_studiolight_init(void) /* Add default studio light */ sl = studiolight_create(STUDIOLIGHT_INTERNAL | STUDIOLIGHT_SPHERICAL_HARMONICS_COEFFICIENTS_CALCULATED | STUDIOLIGHT_ORIENTATION_CAMERA); BLI_strncpy(sl->name, "INTERNAL_01", FILE_MAXFILE); - + copy_v3_fl3(sl->spherical_harmonics_coefs[0], 1.03271556f, 1.07163882f, 1.11193657f); copy_v3_fl3(sl->spherical_harmonics_coefs[1], -0.00480952f, 0.05290511f, 0.16394117f); copy_v3_fl3(sl->spherical_harmonics_coefs[2], -0.29686999f, -0.27378261f, -0.24797194f); -- cgit v1.2.3