0030102: Visualization, TKOpenGl - Graphic3d_TOSM_FACET shading is incorrect in some...
[occt.git] / src / OpenGl / OpenGl_ShaderManager.cxx
index bdde9fb..71f6bda 100644 (file)
@@ -2192,6 +2192,7 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramPhong (Handle(OpenGl_Sha
     + aSrcFragExtraMain
     + (isFlatNormal
     ? EOL"  Normal = normalize (cross (dFdx (Position.xyz / Position.w), dFdy (Position.xyz / Position.w)));"
+      EOL"  if (!gl_FrontFacing) { Normal = -Normal; }"
     : "")
     + EOL"  occSetFragColor (getColor());"
     + aSrcFragWriteOit