From 9dfbcde88ce77be0be9f09e0b482f7a9051103e5 Mon Sep 17 00:00:00 2001 From: MeFisto94 Date: Thu, 2 Apr 2020 23:06:58 +0200 Subject: [PATCH] Fixes #1304 - Don't use mat3() constructor to keep compatibility with GLSL110 --- jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib b/jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib index ee4edac8e..692dd8619 100644 --- a/jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib +++ b/jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib @@ -143,7 +143,11 @@ float renderProbe(vec3 viewDir, vec3 worldPos, vec3 normal, vec3 norm, float Rou if(lightProbeData[0][3] != 0.0){ // oriented box probe - mat3 wToLocalRot = mat3(lightProbeData); + mat3 wToLocalRot; + wToLocalRot[0].xyz = lightProbeData[0].xyz; + wToLocalRot[1].xyz = lightProbeData[1].xyz; + wToLocalRot[2].xyz = lightProbeData[2].xyz; + wToLocalRot = inverse(wToLocalRot); vec3 scale = vec3(lightProbeData[0][3], lightProbeData[1][3], lightProbeData[2][3]); #if NB_PROBES >= 2