From 11e2cb2d0121efbe9a8a5187b9a1af3b6843084d Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 8 Jun 2018 22:09:25 +0300 Subject: [PATCH] RenderableNamedEntity : adjust behind nearplane epsilon --- plugins/entity/namedentity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/entity/namedentity.h b/plugins/entity/namedentity.h index 07739889..2ab6dc85 100644 --- a/plugins/entity/namedentity.h +++ b/plugins/entity/namedentity.h @@ -181,7 +181,7 @@ public: if( volume.fill() ){ const Matrix4& viewproj = volume.GetViewMatrix(); const Vector3 pos_in_world = matrix4_transformed_point( localToWorld, m_position ); - if( viewproj[3] * pos_in_world[0] + viewproj[7] * pos_in_world[1] + viewproj[11] * pos_in_world[2] + viewproj[15] < 3e-5 ) //w < 0: behind nearplane + if( viewproj[3] * pos_in_world[0] + viewproj[7] * pos_in_world[1] + viewproj[11] * pos_in_world[2] + viewproj[15] < 0.005f ) //w < 0: behind nearplane return; if( m_nameMode == eNameNormal && vector3_length_squared( pos_in_world - volume.getViewer() ) > static_cast( g_showNamesDist ) * static_cast( g_showNamesDist ) ) return;