David `Deltakosh` Catuhe пре 5 година
родитељ
комит
64bb21c736

+ 6 - 15
src/Lights/spotLight.ts

@@ -383,21 +383,12 @@ export class SpotLight extends ShadowLight {
             normalizeDirection = Vector3.Normalize(this.direction);
         }
 
-        if (this.getScene().useRightHandedSystem) {
-            this._uniformBuffer.updateFloat4("vLightDirection",
-                -normalizeDirection.x,
-                -normalizeDirection.y,
-                -normalizeDirection.z,
-                this._cosHalfAngle,
-                lightIndex);
-        } else {
-            this._uniformBuffer.updateFloat4("vLightDirection",
-                normalizeDirection.x,
-                normalizeDirection.y,
-                normalizeDirection.z,
-                this._cosHalfAngle,
-                lightIndex);
-        }
+        this._uniformBuffer.updateFloat4("vLightDirection",
+            normalizeDirection.x,
+            normalizeDirection.y,
+            normalizeDirection.z,
+            this._cosHalfAngle,
+            lightIndex);
 
         this._uniformBuffer.updateFloat4("vLightFalloff",
             this.range,

BIN
tests/validation/ReferenceImages/advancedShadows2.png


+ 6 - 0
tests/validation/config.json

@@ -367,6 +367,12 @@
             "referenceImage": "advancedShadows.png"
         },
         {
+            "title": "Advanced shadows (right handed)",
+            "renderCount": 20,
+            "playgroundId": "#B48X7G#32",
+            "referenceImage": "advancedShadows2.png"
+        },
+        {
             "title": "point light shadows",
             "playgroundId": "#XDNVAY#1",
             "referenceImage": "pointLightShadows.png"