From a7f8adb80a250026b5adce4be44bc438fc570539 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 27 Oct 2016 20:14:39 +0200 Subject: [PATCH] Handles now correctly hide selection aura when in x-ray mode USL-33 --- plugins/XRayView/xray_composite.shader | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/XRayView/xray_composite.shader b/plugins/XRayView/xray_composite.shader index cdd3509e32..f6e67c1d0f 100644 --- a/plugins/XRayView/xray_composite.shader +++ b/plugins/XRayView/xray_composite.shader @@ -23,6 +23,10 @@ fragment = uniform vec4 u_outline_color; uniform vec4 u_error_color; + const vec3 x_axis = vec3(1.0, 0.0, 0.0); + const vec3 y_axis = vec3(0.0, 1.0, 0.0); + const vec3 z_axis = vec3(0.0, 0.0, 1.0); + varying vec2 v_uvs; float kernel[9]; @@ -51,7 +55,15 @@ fragment = sum += color * (kernel[i] / u_outline_strength); } - gl_FragColor = mix(result, vec4(abs(sum.a)) * u_outline_color, abs(sum.a)); + vec4 layer1 = texture2D(u_layer1, v_uvs); + if((layer1.rgb == x_axis || layer1.rgb == y_axis || layer1.rgb == z_axis)) + { + gl_FragColor = result; + } + else + { + gl_FragColor = mix(result, vec4(abs(sum.a)) * u_outline_color, abs(sum.a)); + } } [defaults]