diff --git a/libraries/render-utils/src/Highlight.slh b/libraries/render-utils/src/Highlight.slh index b26337676f..885df34d26 100644 --- a/libraries/render-utils/src/Highlight.slh +++ b/libraries/render-utils/src/Highlight.slh @@ -26,7 +26,6 @@ layout(location=0) in vec2 varTexCoord0; layout(location=0) out vec4 outFragColor; const float FAR_Z = 1.0; -const float LINEAR_DEPTH_BIAS = 5e-3; const float OPACITY_EPSILON = 5e-3; <@func main(IS_FILLED)@> @@ -46,7 +45,7 @@ void main(void) { highlightedDepth = -evalZeyeFromZdb(highlightedDepth); sceneDepth = -evalZeyeFromZdb(sceneDepth); - if (sceneDepth < (highlightedDepth-LINEAR_DEPTH_BIAS)) { + if (sceneDepth < highlightedDepth) { outFragColor = vec4(params._fillOccludedColor, params._fillOccludedAlpha); } else { outFragColor = vec4(params._fillUnoccludedColor, params._fillUnoccludedAlpha); @@ -107,7 +106,7 @@ void main(void) { sceneDepth = -evalZeyeFromZdb(sceneDepth); // Are we occluded? - if (sceneDepth < (outlinedDepth/*-LINEAR_DEPTH_BIAS*/)) { + if (sceneDepth < outlinedDepth) { outFragColor = vec4(params._outlineOccludedColor, intensity * params._outlineOccludedAlpha); } else { outFragColor = vec4(params._outlineUnoccludedColor, intensity * params._outlineUnoccludedAlpha);