diff options
author | mano-wii <germano.costa@ig.com.br> | 2018-10-30 06:11:22 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2018-10-30 06:11:22 +0300 |
commit | 7fb1a1ca26c519d12ffb3973f68fa50f306d7456 (patch) | |
tree | 1361e10460c179f353f2b85059b8446aaa6940c9 /mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl | |
parent | 747c0a3731f10972eb373a119171d75a35b95b7c (diff) |
Addon Snap Utilities Line: Update to work in blender2.8
Changes:
- The operator follows the same style of the tools in the toolbar;
- Now a new "Make Line" tool appears next to "Add Cube";
- The operator only works in edit mode;
- The "create new object" option has been removed;
Diffstat (limited to 'mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl')
-rw-r--r-- | mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl b/mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl new file mode 100644 index 00000000..3e01f7b0 --- /dev/null +++ b/mesh_snap_utilities_line/snap_context_l/shaders/ID_color_frag.glsl @@ -0,0 +1,24 @@ +uniform int offset; + +#ifdef USE_CLIP_PLANES +uniform bool use_clip_planes; +in vec4 clip_distance; +#endif + +out uint FragColor; + +void main() +{ +#ifdef USE_CLIP_PLANES + if (use_clip_planes && + ((clip_distance[0] < 0) || + (clip_distance[1] < 0) || + (clip_distance[2] < 0) || + (clip_distance[3] < 0))) + { + discard; + } +#endif + + FragColor = uint(gl_PrimitiveID + offset); +} |