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')
-rw-r--r--source/blender/draw/modes/shaders/object_grid_vert.glsl4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/object_grid_vert.glsl b/source/blender/draw/modes/shaders/object_grid_vert.glsl
index a346973a597..15b37bb289d 100644
--- a/source/blender/draw/modes/shaders/object_grid_vert.glsl
+++ b/source/blender/draw/modes/shaders/object_grid_vert.glsl
@@ -53,10 +53,10 @@ void main()
/* Used for additional Z axis */
if ((gridFlag & CLIP_Z_POS) != 0) {
- realPos.z = max(realPos.z, 0.0);
+ realPos.z = clamp(realPos.z, 0.0, 1e30);
}
if ((gridFlag & CLIP_Z_NEG) != 0) {
- realPos.z = min(-realPos.z, 0.0);
+ realPos.z = clamp(realPos.z, -1e30, 0.0);
}
gl_Position = ViewProjectionMatrix * vec4(realPos, 1.0);