X-Git-Url: http://git.dev.opencascade.org/gitweb/?p=occt.git;a=blobdiff_plain;f=src%2FShaders%2FPhongShading.fs;h=088384d872d0c464726f57240cc750b98bf7ab82;hp=d7fb9b29345940cc588668555e89023f447f934a;hb=89a929ea26e11861b956ebd80f92804e834b6d4b;hpb=4ad142d9cbf856b0d830371bf11debc58c7de0b5 diff --git a/src/Shaders/PhongShading.fs b/src/Shaders/PhongShading.fs index d7fb9b2934..088384d872 100755 --- a/src/Shaders/PhongShading.fs +++ b/src/Shaders/PhongShading.fs @@ -179,20 +179,9 @@ void main() for (int anIndex = 0; anIndex < occClipPlaneCount; ++anIndex) { vec4 aClipEquation = occClipPlaneEquations[anIndex]; - int aClipSpace = occClipPlaneSpaces[anIndex]; - if (aClipSpace == OccEquationCoords_World) + if (dot (aClipEquation.xyz, PositionWorld.xyz / PositionWorld.w) + aClipEquation.w < 0.0) { - if (dot (aClipEquation.xyz, PositionWorld.xyz / PositionWorld.w) + aClipEquation.w < 0.0) - { - discard; - } - } - else if (aClipSpace == OccEquationCoords_View) - { - if (dot (aClipEquation.xyz, Position.xyz) + aClipEquation.w < 0.0) - { - discard; - } + discard; } }