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:
Diffstat (limited to 'source/blender/draw/modes/shaders/common_view_lib.glsl')
-rw-r--r--source/blender/draw/modes/shaders/common_view_lib.glsl8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/common_view_lib.glsl b/source/blender/draw/modes/shaders/common_view_lib.glsl
index 845c615c75c..20a54947db7 100644
--- a/source/blender/draw/modes/shaders/common_view_lib.glsl
+++ b/source/blender/draw/modes/shaders/common_view_lib.glsl
@@ -1,3 +1,5 @@
+#define COMMON_VIEW_LIB
+
/* keep in sync with DRWManager.view_data */
layout(std140) uniform viewBlock
{
@@ -15,6 +17,12 @@ layout(std140) uniform viewBlock
vec4 CameraTexCoFactors;
};
+#ifdef world_clip_planes_calc_clip_distance
+# undef world_clip_planes_calc_clip_distance
+# define world_clip_planes_calc_clip_distance(p) \
+ _world_clip_planes_calc_clip_distance(p, clipPlanes)
+#endif
+
uniform mat4 ModelMatrix;
uniform mat4 ModelMatrixInverse;