diff --git a/Source/Scene/processPbrMaterials.js b/Source/Scene/processPbrMaterials.js index 8b255bad5cbb..99ec66acf569 100644 --- a/Source/Scene/processPbrMaterials.js +++ b/Source/Scene/processPbrMaterials.js @@ -729,7 +729,7 @@ define([ fragmentShader += ' gltf_clippingPlanesMatrix[0][1], gltf_clippingPlanesMatrix[1][1], gltf_clippingPlanesMatrix[2][1], \n'; fragmentShader += ' gltf_clippingPlanesMatrix[0][2], gltf_clippingPlanesMatrix[1][2], gltf_clippingPlanesMatrix[2][2]); \n'; fragmentShader += ' const mat3 yUpToZUp = mat3(-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 1.0, 0.0); \n'; - fragmentShader += ' vec3 cubeDir = yUpToZUp * fixedToENU * n; \n'; + fragmentShader += ' vec3 cubeDir = normalize(yUpToZUp * fixedToENU * normalize(reflect(-v, n))); \n'; fragmentShader += '#ifdef DIFFUSE_IBL \n'; fragmentShader += '#ifdef CUSTOM_SPHERICAL_HARMONICS \n';