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:
authorFabian Schempp <fabianschempp@googlemail.com>2022-04-18 23:28:08 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-18 23:28:08 +0300
commit01616f9ed2da14b5cad40efac03d1a22dbb759f3 (patch)
tree4955ad12f260e557aa1c0f724a320e565f8bce5c /source/blender/draw/intern/shaders/common_math_lib.glsl
parentf06d361da1249c93568153bae88bcdf43b4774a1 (diff)
parent314b27850ccb6d103cf5c73855187cfc11ec48d8 (diff)
Merge branch 'master' into soc-2021-porting-modifiers-to-nodes-remesh-voxel
Diffstat (limited to 'source/blender/draw/intern/shaders/common_math_lib.glsl')
-rw-r--r--source/blender/draw/intern/shaders/common_math_lib.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/intern/shaders/common_math_lib.glsl b/source/blender/draw/intern/shaders/common_math_lib.glsl
index 4d0ffaeb40f..1ac26c91b93 100644
--- a/source/blender/draw/intern/shaders/common_math_lib.glsl
+++ b/source/blender/draw/intern/shaders/common_math_lib.glsl
@@ -1,4 +1,8 @@
+/* WORKAROUND: to guard against double include in EEVEE. */
+#ifndef COMMON_MATH_LIB_GLSL
+#define COMMON_MATH_LIB_GLSL
+
/* ---------------------------------------------------------------------- */
/** \name Common Math Utilities
* \{ */
@@ -276,3 +280,5 @@ vec3 hue_gradient(float t)
vec3 p = abs(fract(t + vec3(1.0, 2.0 / 3.0, 1.0 / 3.0)) * 6.0 - 3.0);
return (clamp(p - 1.0, 0.0, 1.0));
}
+
+#endif /* COMMON_MATH_LIB_GLSL */