From e5e520e8d0888a329f19bf510d586738380a6bf1 Mon Sep 17 00:00:00 2001 From: thinkinggis Date: Wed, 5 Feb 2020 10:35:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20point=20layer=20=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E9=AB=98=E4=BA=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/shaders/picking.frag.glsl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/shaders/picking.frag.glsl b/packages/core/src/shaders/picking.frag.glsl index 5b1864759e..0e58d7eb15 100644 --- a/packages/core/src/shaders/picking.frag.glsl +++ b/packages/core/src/shaders/picking.frag.glsl @@ -16,11 +16,11 @@ vec4 filterHighlightColor(vec4 color) { if (selected) { vec4 highLightColor = u_HighlightColor * COLOR_SCALE; - // float highLightAlpha = highLightColor.a; - // float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha)); + float highLightAlpha = highLightColor.a; + float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha)); - // vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio); - return highLightColor; + vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio); + return vec4(resultRGB, color.a); } else { return color; }