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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-05 23:56:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-05 23:56:18 +0300
commit08ae597d63d2e89888ae937c35357b2de62d7a8e (patch)
tree1b5ff1e7cf07dbdb38cd5ceefac6fe236a922d23 /source/blender/draw/modes/shaders/object_grid_vert.glsl
parentf5d096798cda8cca34a31a4a4ce441cb655b982c (diff)
Cleanup: flag checks
Diffstat (limited to 'source/blender/draw/modes/shaders/object_grid_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/object_grid_vert.glsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/modes/shaders/object_grid_vert.glsl b/source/blender/draw/modes/shaders/object_grid_vert.glsl
index 3f99d8b5d0a..a346973a597 100644
--- a/source/blender/draw/modes/shaders/object_grid_vert.glsl
+++ b/source/blender/draw/modes/shaders/object_grid_vert.glsl
@@ -27,11 +27,11 @@ void main()
vec3 vert_pos, proj_camera_pos;
/* Project camera pos to the needed plane */
- if ((gridFlag & PLANE_XY) > 0) {
+ if ((gridFlag & PLANE_XY) != 0) {
vert_pos = vec3(pos.x, pos.y, 0.0);
proj_camera_pos = vec3(cameraPos.x, cameraPos.y, 0.0);
}
- else if ((gridFlag & PLANE_XZ) > 0) {
+ else if ((gridFlag & PLANE_XZ) != 0) {
vert_pos = vec3(pos.x, 0.0, pos.y);
proj_camera_pos = vec3(cameraPos.x, 0.0, cameraPos.z);
}
@@ -52,10 +52,10 @@ void main()
vec3 realPos = proj_camera_pos + vert_pos;
/* Used for additional Z axis */
- if ((gridFlag & CLIP_Z_POS) > 0) {
+ if ((gridFlag & CLIP_Z_POS) != 0) {
realPos.z = max(realPos.z, 0.0);
}
- if ((gridFlag & CLIP_Z_NEG) > 0) {
+ if ((gridFlag & CLIP_Z_NEG) != 0) {
realPos.z = min(-realPos.z, 0.0);
}