Browse Source

Fixed issue with directional lights shadows with new projection matrices

David Catuhe 8 years ago
parent
commit
266c61a465

File diff suppressed because it is too large
+ 25 - 25
dist/preview release/babylon.core.js


File diff suppressed because it is too large
+ 6107 - 6105
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 36 - 36
dist/preview release/babylon.js


File diff suppressed because it is too large
+ 154 - 135
dist/preview release/babylon.max.js


File diff suppressed because it is too large
+ 35 - 35
dist/preview release/babylon.noworker.js


+ 3 - 1
src/Math/babylon.math.ts

@@ -2967,12 +2967,14 @@
             let b = 2.0 / (top - bottom);
             let c = 2.0 / (f - n);
             let d = -(f + n)/(f - n);
+            let i0 = (left + right) / (left - right);
+            let i1 = (top + bottom) / (bottom - top);
 
             BABYLON.Matrix.FromValuesToRef(
                 a, 0, 0, 0,
                 0, b, 0, 0,
                 0, 0, c, 0,
-                0, 0, d, 1,
+                i0, i1, d, 1,
                 result
             );
         }