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:
authorAnkit Meel <ankitjmeel@gmail.com>2020-11-07 15:54:56 +0300
committerAnkit Meel <ankitjmeel@gmail.com>2020-11-07 16:18:13 +0300
commitae342ed4511cf2e144dcd27ce2c635d3d536f9ad (patch)
tree02901841a7625c85bee5e8eb1fa1796d1b6136b4 /intern/sky
parent4525049aa0cf818f6483dce589ac9791eb562338 (diff)
Cleanup: Clang-tidy else-after-return
Diffstat (limited to 'intern/sky')
-rw-r--r--intern/sky/source/sky_nishita.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/intern/sky/source/sky_nishita.cpp b/intern/sky/source/sky_nishita.cpp
index f36bfcc3d7b..68fc2085448 100644
--- a/intern/sky/source/sky_nishita.cpp
+++ b/intern/sky/source/sky_nishita.cpp
@@ -112,10 +112,12 @@ static float density_mie(float height)
static float density_ozone(float height)
{
float den = 0.0f;
- if (height >= 10000.0f && height < 25000.0f)
+ if (height >= 10000.0f && height < 25000.0f) {
den = 1.0f / 15000.0f * height - 2.0f / 3.0f;
- else if (height >= 25000 && height < 40000)
+ }
+ else if (height >= 25000 && height < 40000) {
den = -(1.0f / 15000.0f * height - 8.0f / 3.0f);
+ }
return den;
}
@@ -133,15 +135,16 @@ static float phase_mie(float mu)
/* Intersection helpers */
static bool surface_intersection(float3 pos, float3 dir)
{
- if (dir.z >= 0)
+ if (dir.z >= 0) {
return false;
+ }
float b = -2.0f * dot(dir, -pos);
float c = len_squared(pos) - sqr(earth_radius);
float t = b * b - 4.0f * c;
- if (t >= 0.0f)
+ if (t >= 0.0f) {
return true;
- else
- return false;
+ }
+ return false;
}
static float3 atmosphere_intersection(float3 pos, float3 dir)