diff --git a/src/OpenGl/OpenGl_PrimitiveArray.cxx b/src/OpenGl/OpenGl_PrimitiveArray.cxx index f6937deeaf..8804b51bcc 100644 --- a/src/OpenGl/OpenGl_PrimitiveArray.cxx +++ b/src/OpenGl/OpenGl_PrimitiveArray.cxx @@ -828,7 +828,7 @@ void OpenGl_PrimitiveArray::Render (const Handle(OpenGl_Workspace)& theWorkspace theWorkspace->View()->Window()->Size(aViewWidth, aViewHeight); Standard_Integer aMin = aViewWidth < aViewHeight ? aViewWidth : aViewHeight; - Standard_ShortReal anEdgeWidth = 2*(Standard_ShortReal)anAspectFace->Aspect()->EdgeWidth() / (Standard_ShortReal)aMin; + Standard_ShortReal anEdgeWidth = (Standard_ShortReal)anAspectFace->Aspect()->EdgeWidth() / (Standard_ShortReal)aMin; aCtx->SetSilhouetteThickness(anEdgeWidth); aCtx->SetIsSilhouettePass(Standard_True); diff --git a/src/OpenGl/OpenGl_ShaderManager.cxx b/src/OpenGl/OpenGl_ShaderManager.cxx index d5c29a6a52..5be378ae36 100644 --- a/src/OpenGl/OpenGl_ShaderManager.cxx +++ b/src/OpenGl/OpenGl_ShaderManager.cxx @@ -1616,10 +1616,10 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramUnlit (Handle(OpenGl_Sha EOL" vec3 pdelta = vec3(0.0, 0.0, 0.0);" EOL" vec4 proj_normal = occProjectionMatrix * occWorldViewMatrix * occModelWorldMatrix * vec4(occNormal, 0.0);" EOL"" - EOL" float aShift = occSilhouetteThickness / 2.0;" + EOL" float aShift = occSilhouetteThickness;"// / 2.0;" EOL" if (occOrthoScale > 0.0)" EOL" {" - EOL" if (abs(proj_normal[2]) < 0.1)" + EOL" if (abs(proj_normal[2]) < 0.25)" EOL" {" EOL" float k = 1.0;" EOL" if (occIsSilhouettePass < 0.1)"