]> OCCT Git - occt.git/commitdiff
0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for...
authorkgv <kgv@opencascade.com>
Mon, 14 Dec 2020 19:07:24 +0000 (22:07 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 17 Dec 2020 18:05:05 +0000 (21:05 +0300)
Fixed occLight_IsHeadlight() misuse in sample GLSL program.

src/Shaders/PhongShading.fs

index 1e52cbe9c470b5d75b829e4743b0bbde63315543..33d86fa4200d77018b83b04bde45ca402ac5e201 100755 (executable)
@@ -65,7 +65,7 @@ void spotLight (in int  theId,
 {
   vec3 aLight   = occLight_Position      (theId).xyz;
   vec3 aSpotDir = occLight_SpotDirection (theId).xyz;
-  if (occLight_IsHeadlight (theId) == 0)
+  if (!occLight_IsHeadlight (theId))
   {
     aLight   = vec3 (occWorldViewMatrix * vec4 (aLight,   1.0));
     aSpotDir = vec3 (occWorldViewMatrix * vec4 (aSpotDir, 0.0));
@@ -114,7 +114,7 @@ void directionalLight (in int  theId,
                        in vec3 theView)
 {
   vec3 aLight = normalize (occLight_Position (theId).xyz);
-  if (occLight_IsHeadlight (theId) == 0)
+  if (!occLight_IsHeadlight (theId))
   {
     aLight = vec3 (occWorldViewMatrix * vec4 (aLight, 0.0));
   }