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:
authorClément Foucault <foucault.clem@gmail.com>2018-06-11 19:03:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-11 19:04:00 +0300
commit1f1ca7447637e8a5216358346698ad8f5f5ba328 (patch)
tree2292cb78fa8ec9590974edf89dd5a9c2a9255922 /source/blender/draw/modes/shaders
parent638590078c716c65ed0e9c4a0cbcff60c46a98e2 (diff)
Outlines: Make Xray outlines 2px thick instead of 3px
Diffstat (limited to 'source/blender/draw/modes/shaders')
-rw-r--r--source/blender/draw/modes/shaders/object_outline_detect_frag.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl b/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl
index 45bbdb18340..9a7856ecb13 100644
--- a/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl
+++ b/source/blender/draw/modes/shaders/object_outline_detect_frag.glsl
@@ -51,6 +51,12 @@ void main()
id.w = texelFetchOffset(outlineId, texel, 0, ivec2( 1, 0)).r;
#endif
+#ifdef WIRE
+ /* We want only 2px outlines. */
+ /* TODO optimize, don't sample if we don't need to. */
+ id.xy = uvec2(ref_id);
+#endif
+
bool outline = any(notEqual(id, uvec4(ref_id)));
ivec2 depth_texel = texel;