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:
authorHallam Roberts <MysteryPancake>2022-03-11 18:14:05 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-03-11 20:27:58 +0300
commit3da84d8b086bd2d09beb5bdb89ba6beddf1e1dd6 (patch)
tree698e6793ba776716a256abf10ed4b1623ade15eb /source/blender/draw/engines/eevee/eevee_lightprobes.c
parent62a0984d7290cbd6fd3acfa79d53765f97f93b0a (diff)
Cleanup: use M_PI_2 and M_PI_4 where possible
The constant M_PI_4 is added to GLSL to ensure it works there too. Differential Revision: https://developer.blender.org/D14288
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_lightprobes.c')
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightprobes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c
index a20fe156eda..7029d015b22 100644
--- a/source/blender/draw/engines/eevee/eevee_lightprobes.c
+++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c
@@ -613,7 +613,7 @@ void EEVEE_lightprobes_planar_data_from_object(Object *ob,
eplanar->clip_edge_y_neg = dot_v3v3(eplanar->clip_vec_y, vec);
/* Facing factors */
- float max_angle = max_ff(1e-2f, 1.0f - probe->falloff) * M_PI * 0.5f;
+ float max_angle = max_ff(1e-2f, 1.0f - probe->falloff) * M_PI_2;
float min_angle = 0.0f;
eplanar->facing_scale = 1.0f / max_ff(1e-8f, cosf(min_angle) - cosf(max_angle));
eplanar->facing_bias = -min_ff(1.0f - 1e-8f, cosf(max_angle)) * eplanar->facing_scale;