mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030102: Visualization, TKOpenGl - Graphic3d_TOSM_FACET shading is incorrect in some casesn
gl_FrontFacing is now considered within Normal computation.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user