Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-05-01 03:35:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-01 03:51:10 +0300
commit63f0e150edaeea26fbcc48f62597f4f5c71cc64a (patch)
tree275c7ec1f9732fd992ce8351cf0da284211edb99 /source/blender/draw/engines/eevee/eevee_lights.c
parent480a09a92f7f1f28aabb4ad84b86ddccd6580afc (diff)
Cleanup: comments (long lines) in draw
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lights.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lights.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lights.c b/source/blender/draw/engines/eevee/eevee_lights.c
index 917043d70e7..270defb039b 100644
--- a/source/blender/draw/engines/eevee/eevee_lights.c
+++ b/source/blender/draw/engines/eevee/eevee_lights.c
@@ -680,7 +680,8 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli)
power = 1.0f / (evli->sizex * evli->sizey * 4.0f * M_PI) * /* 1/(w*h*Pi) */
80.0f; /* XXX : Empirical, Fit cycles power */
if (ELEM(la->area_shape, LA_AREA_DISK, LA_AREA_ELLIPSE)) {
- /* Scale power to account for the lower area of the ellipse compared to the surrounding rectangle. */
+ /* Scale power to account for the lower area of the ellipse compared to the surrounding
+ * rectangle. */
power *= 4.0f / M_PI;
}
}
@@ -693,8 +694,9 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli)
}
else {
power = 1.0f / (evli->radius * evli->radius * M_PI); /* 1/(r²*Pi) */
- /* Make illumation power closer to cycles for bigger radii. Cycles uses a cos^3 term that we cannot reproduce
- * so we account for that by scaling the light power. This function is the result of a rough manual fitting. */
+ /* Make illumation power closer to cycles for bigger radii. Cycles uses a cos^3 term that we
+ * cannot reproduce so we account for that by scaling the light power. This function is the
+ * result of a rough manual fitting. */
power += 1.0f / (2.0f * M_PI); /* power *= 1 + r²/2 */
}
return power;
@@ -1383,7 +1385,8 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
DRW_draw_pass(psl->shadow_pass);
}
- /* 0.001f is arbitrary, but it should be relatively small so that filter size is not too big. */
+ /* 0.001f is arbitrary, but it should be relatively small so that filter size is not too big.
+ */
float filter_texture_size = la->soft * 0.001f;
float filter_pixel_size = ceil(filter_texture_size / srd->cube_texel_size);
linfo->filter_size = srd->cube_texel_size * ((filter_pixel_size > 1.0f) ? 1.5f : 0.0f);