mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
eventual correction of the outline shader
This commit is contained in:
@@ -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);
|
||||
|
@@ -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)"
|
||||
|
Reference in New Issue
Block a user