Skip to content

Commit

Permalink
Fix reflection vector.
Browse files Browse the repository at this point in the history
  • Loading branch information
bagnell committed Dec 18, 2018
1 parent 50719fd commit 01d0ca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Scene/processPbrMaterials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 01d0ca0

Please sign in to comment.