From 6169ae2d3d2075f62e71365eba7906ebecc01f04 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 14 Dec 2020 22:07:24 +0300 Subject: [PATCH] 0031996: Visualization - PhongShading.fs compilation error on OpenGL drivers for AMD Radeon Fixed occLight_IsHeadlight() misuse in sample GLSL program. --- src/Shaders/PhongShading.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Shaders/PhongShading.fs b/src/Shaders/PhongShading.fs index 1e52cbe9c4..33d86fa420 100755 --- a/src/Shaders/PhongShading.fs +++ b/src/Shaders/PhongShading.fs @@ -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)); }