Skip to content

Commit c198b1d

Browse files
authored
Merge pull request jMonkeyEngine#1318 from MeFisto94/fix-pbr-opengl2
Fixes jMonkeyEngine#1304 - Don't use mat3() constructor to keep compatibility with…
2 parents 728a05c + 461227b commit c198b1d

File tree

1 file changed

+5
-1
lines changed
  • jme3-core/src/main/resources/Common/ShaderLib

1 file changed

+5
-1
lines changed

jme3-core/src/main/resources/Common/ShaderLib/PBR.glsllib

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ float renderProbe(vec3 viewDir, vec3 worldPos, vec3 normal, vec3 norm, float Rou
143143

144144
if(lightProbeData[0][3] != 0.0){
145145
// oriented box probe
146-
mat3 wToLocalRot = mat3(lightProbeData);
146+
mat3 wToLocalRot;
147+
wToLocalRot[0].xyz = lightProbeData[0].xyz;
148+
wToLocalRot[1].xyz = lightProbeData[1].xyz;
149+
wToLocalRot[2].xyz = lightProbeData[2].xyz;
150+
147151
wToLocalRot = inverse(wToLocalRot);
148152
vec3 scale = vec3(lightProbeData[0][3], lightProbeData[1][3], lightProbeData[2][3]);
149153
#if NB_PROBES >= 2

0 commit comments

Comments
 (0)