Forráskód Böngészése

Merge remote-tracking branch 'BabylonJS/master'

MackeyK24 8 éve
szülő
commit
91c0a8227d

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2 - 2
dist/preview release/babylon.core.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1191 - 1191
dist/preview release/babylon.d.ts


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2 - 2
dist/preview release/babylon.js


+ 5 - 2
dist/preview release/babylon.max.js

@@ -12564,10 +12564,10 @@ var BABYLON;
             }
         };
         AbstractMesh.prototype._markSubMeshesAsLightDirty = function () {
-            this._markSubMeshesAsDirty(function (defines) { return defines._areLightsDirty = true; });
+            this._markSubMeshesAsDirty(function (defines) { return defines.markAsLightDirty(); });
         };
         AbstractMesh.prototype._markSubMeshesAsAttributesDirty = function () {
-            this._markSubMeshesAsDirty(function (defines) { return defines._areAttributesDirty = true; });
+            this._markSubMeshesAsDirty(function (defines) { return defines.markAsAttributesDirty(); });
         };
         AbstractMesh.prototype._markSubMeshesAsMiscDirty = function () {
             if (!this.subMeshes) {
@@ -30219,6 +30219,9 @@ var BABYLON;
         };
         MaterialHelper.HandleFallbacksForShadows = function (defines, fallbacks, maxSimultaneousLights) {
             if (maxSimultaneousLights === void 0) { maxSimultaneousLights = 4; }
+            if (!defines["SHADOWS"]) {
+                return;
+            }
             for (var lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {
                 if (!defines["LIGHT" + lightIndex]) {
                     break;

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1191 - 1191
dist/preview release/babylon.module.d.ts


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 2 - 2
dist/preview release/babylon.noworker.js


+ 2 - 0
materialsLibrary/index.html

@@ -71,6 +71,7 @@
 			pointLight.setEnabled(false);
 			var directionalLight = new BABYLON.DirectionalLight("directional", new BABYLON.Vector3(0,-1, 0), scene);
 			directionalLight.setEnabled(false);
+			directionalLight.position = new BABYLON.Vector3(0, 50, 0);
 			var spotLight = new BABYLON.SpotLight("spot", new BABYLON.Vector3(0, -30, 0), new BABYLON.Vector3(0, 1, 0), 1.1, 1, scene);
 			spotLight.setEnabled(false);
 
@@ -128,6 +129,7 @@
 				var shadowGenerator = new BABYLON.ShadowGenerator(1024, directionalLight);
 				shadowGenerator.getShadowMap().renderList.push(shadowCaster);
 				shadowGenerator.usePoissonSampling = true;
+				shadowGenerator.bias = 0;
 				
 				var shadowGenerator2 = new BABYLON.ShadowGenerator(1024, spotLight);
 				shadowGenerator2.getShadowMap().renderList.push(shadowCaster2);

+ 4 - 0
src/Materials/babylon.materialHelper.ts

@@ -180,6 +180,10 @@
         }
 
         public static HandleFallbacksForShadows(defines: MaterialDefines, fallbacks: EffectFallbacks, maxSimultaneousLights = 4): void {
+            if (!defines["SHADOWS"]) {
+                return;
+            }
+
             for (var lightIndex = 0; lightIndex < maxSimultaneousLights; lightIndex++) {
                 if (!defines["LIGHT" + lightIndex]) {
                     break;

+ 2 - 2
src/Mesh/babylon.abstractMesh.ts

@@ -435,11 +435,11 @@
         }
 
         public _markSubMeshesAsLightDirty() {
-            this._markSubMeshesAsDirty(defines => defines._areLightsDirty = true);
+            this._markSubMeshesAsDirty(defines => defines.markAsLightDirty());
         }
 
         public _markSubMeshesAsAttributesDirty() {
-            this._markSubMeshesAsDirty(defines => defines._areAttributesDirty = true);
+            this._markSubMeshesAsDirty(defines => defines.markAsAttributesDirty());
         }
 
         public _markSubMeshesAsMiscDirty() {