David Catuhe 11 gadi atpakaļ
vecāks
revīzija
3491ccb8ef

+ 1 - 0
Babylon/Materials/textures/babylon.renderTargetTexture.js

@@ -8,6 +8,7 @@ var BABYLON = BABYLON || {};
         this._scene.textures.push(this);
 
         this.name = name;
+        this._size = size;
         this._generateMipMaps = generateMipMaps;
 
         this._texture = scene.getEngine().createRenderTargetTexture(size, generateMipMaps);

+ 15 - 9
Babylon/Tools/babylon.sceneLoader.js

@@ -181,6 +181,7 @@ var BABYLON = BABYLON || {};
         var particleSystem = new BABYLON.ParticleSystem("particles#" + emitter.name, parsedParticleSystem.capacity, scene);
         if (parsedParticleSystem.textureName) {
             particleSystem.particleTexture = new BABYLON.Texture(rootUrl + parsedParticleSystem.textureName, scene);
+            particleSystem.particleTexture.name = parsedParticleSystem.textureName;
         }
         particleSystem.minAngularSpeed = parsedParticleSystem.minAngularSpeed;
         particleSystem.maxAngularSpeed = parsedParticleSystem.maxAngularSpeed;
@@ -487,18 +488,23 @@ var BABYLON = BABYLON || {};
                 }
 
                 if (parsedGeometry.matricesIndices) {
-                    var floatIndices = [];
+                    if (!parsedGeometry.matricesIndices._isExpanded) {
+                        var floatIndices = [];
 
-                    for (var i = 0; i < parsedGeometry.matricesIndices.length; i++) {
-                        var matricesIndex = parsedGeometry.matricesIndices[i];
+                        for (var i = 0; i < parsedGeometry.matricesIndices.length; i++) {
+                            var matricesIndex = parsedGeometry.matricesIndices[i];
 
-                        floatIndices.push(matricesIndex & 0x000000FF);
-                        floatIndices.push((matricesIndex & 0x0000FF00) >> 8);
-                        floatIndices.push((matricesIndex & 0x00FF0000) >> 16);
-                        floatIndices.push(matricesIndex >> 24);
-                    }
+                            floatIndices.push(matricesIndex & 0x000000FF);
+                            floatIndices.push((matricesIndex & 0x0000FF00) >> 8);
+                            floatIndices.push((matricesIndex & 0x00FF0000) >> 16);
+                            floatIndices.push(matricesIndex >> 24);
+                        }
 
-                    mesh.setVerticesData(floatIndices, BABYLON.VertexBuffer.MatricesIndicesKind, false);
+                        mesh.setVerticesData(floatIndices, BABYLON.VertexBuffer.MatricesIndicesKind, false);
+                    } else {
+                        delete parsedGeometry.matricesIndices._isExpanded;
+                        mesh.setVerticesData(parsedGeometry.matricesIndices, BABYLON.VertexBuffer.MatricesIndicesKind, false);
+                    }
                 }
 
                 if (parsedGeometry.matricesWeights) {

+ 280 - 6
Babylon/Tools/babylon.sceneSerializer.js

@@ -75,7 +75,7 @@ var BABYLON = BABYLON || {};
         return serializationObject;
     };
 
-    var appendAnimations = function(source, destination) {
+    var appendAnimations = function (source, destination) {
         if (source.animations) {
             destination.animations = [];
             for (var animationIndex = 0; animationIndex < source.animations.length; animationIndex++) {
@@ -97,8 +97,8 @@ var BABYLON = BABYLON || {};
 
         var dataType = animation.dataType;
         serializationObject.keys = [];
-        for (var index = 0; index < animation.keys.length; index++) {
-            var animationKey = animation.keys[index];
+        for (var index = 0; index < animation._keys.length; index++) {
+            var animationKey = animation._keys[index];
 
             var key = {};
             key.frame = animationKey.frame;
@@ -120,6 +120,27 @@ var BABYLON = BABYLON || {};
         return serializationObject;
     };
 
+    var serializeMultiMaterial = function (material) {
+        var serializationObject = {};
+
+        serializationObject.name = material.name;
+        serializationObject.id = material.id;
+
+        serializationObject.materials = [];
+
+        for (var matIndex = 0; matIndex < material.subMaterials.length; matIndex++) {
+            var subMat = material.subMaterials[matIndex];
+
+            if (subMat) {
+                serializationObject.materials.push(subMat.id);
+            } else {
+                serializationObject.materials.push(null);
+            }
+        }
+
+        return serializationObject;
+    };
+
     var serializeMaterial = function (material) {
         var serializationObject = {};
 
@@ -224,6 +245,214 @@ var BABYLON = BABYLON || {};
         return serializationObject;
     };
 
+    var serializeSkeleton = function (skeleton) {
+        var serializationObject = {};
+
+        serializationObject.name = skeleton.name;
+        serializationObject.id = skeleton.id;
+
+        serializationObject.bones = [];
+
+        for (var index = 0; index < skeleton.bones.length; index++) {
+            var bone = skeleton.bones[index];
+
+            var serializedBone = {
+                parentBoneIndex: bone._parent ? bone._parent.id : -1,
+                name: bone.name,
+                matrix: bone._matrix.toArray()
+            };
+
+            serializationObject.bones.push(serializedBone);
+
+            if (bone.animations && bone.animations.length > 0) {
+                serializedBone.animation = serializeAnimation(bone.animations[0]);
+            }
+        }
+        return serializationObject;
+    };
+
+    var serializeParticleSystem = function (particleSystem) {
+        var serializationObject = {};
+
+        serializationObject.emitterId = particleSystem.emitter.id;
+        serializationObject.capacity = particleSystem._capacity;
+
+        if (particleSystem.particleTexture) {
+            serializationObject.textureName = particleSystem.particleTexture.name;
+        }
+
+        serializationObject.minAngularSpeed = particleSystem.minAngularSpeed;
+        serializationObject.maxAngularSpeed = particleSystem.maxAngularSpeed;
+        serializationObject.minSize = particleSystem.minSize;
+        serializationObject.maxSize = particleSystem.maxSize;
+        serializationObject.minLifeTime = particleSystem.minLifeTime;
+        serializationObject.maxLifeTime = particleSystem.maxLifeTime;
+        serializationObject.emitRate = particleSystem.emitRate;
+        serializationObject.minEmitBox = particleSystem.minEmitBox.asArray();
+        serializationObject.maxEmitBox = particleSystem.maxEmitBox.asArray();
+        serializationObject.gravity = particleSystem.gravity.asArray();
+        serializationObject.direction1 = particleSystem.direction1.asArray();
+        serializationObject.direction2 = particleSystem.direction2.asArray();
+        serializationObject.color1 = particleSystem.color1.asArray();
+        serializationObject.color2 = particleSystem.color2.asArray();
+        serializationObject.colorDead = particleSystem.colorDead.asArray();
+        serializationObject.updateSpeed = particleSystem.updateSpeed;
+        serializationObject.targetStopDuration = particleSystem.targetStopFrame;
+        serializationObject.textureMask = particleSystem.textureMask.asArray();
+        serializationObject.blendMode = particleSystem.blendMode;
+
+        return serializationObject;
+    };
+
+    var serializeLensFlareSystem = function (lensFlareSystem) {
+        var serializationObject = {};
+
+        serializationObject.emitterId = lensFlareSystem._emitter.id;
+        serializationObject.borderLimit = lensFlareSystem.borderLimit;
+
+        serializationObject.flares = [];
+        for (var index = 0; index < lensFlareSystem.lensFlares.length; index++) {
+            var flare = lensFlareSystem.lensFlares[index];
+
+            serializationObject.flares.push({
+                size: flare.size,
+                position: flare.position,
+                color: flare.color.asArray(),
+                textureName: BABYLON.Tools.GetFilename(flare.texture.name)
+            });
+        }
+
+
+        return serializationObject;
+    };
+
+    var serializeShadowGenerator = function (light) {
+        var serializationObject = {};
+        var shadowGenerator = light._shadowGenerator;
+
+        serializationObject.lightId = light.id;
+        serializationObject.mapSize = shadowGenerator.getShadowMap()._size;
+        serializationObject.useVarianceShadowMap = shadowGenerator.useVarianceShadowMap;
+
+        serializationObject.renderList = [];
+        for (var meshIndex = 0; meshIndex < shadowGenerator.getShadowMap().renderList.length; meshIndex++) {
+            var mesh = shadowGenerator.getShadowMap().renderList[meshIndex];
+
+            serializationObject.renderList.push(mesh.id);
+        }
+
+        return serializationObject;
+    };
+
+    var serializeMesh = function (mesh) {
+        var serializationObject = {};
+
+        serializationObject.name = mesh.name;
+        serializationObject.id = mesh.id;
+
+        serializationObject.position = mesh.position.asArray();
+
+        if (mesh.rotation) {
+            serializationObject.rotation = mesh.rotation.asArray();
+        } else if (mesh.rotationQuaternion) {
+            serializationObject.rotationQuaternion = mesh.rotationQuaternion.asArray();
+        }
+
+        serializationObject.scaling = mesh.scaling.asArray();
+        serializationObject.localMatrix = mesh.getPivotMatrix().asArray();
+
+        serializationObject.isEnabled = mesh.isEnabled();
+        serializationObject.isVisible = mesh.isVisible;
+        serializationObject.infiniteDistance = mesh.infiniteDistance;
+
+        serializationObject.receiveShadows = mesh.receiveShadows;
+
+        serializationObject.billboardMode = mesh.billboardMode;
+        serializationObject.visibility = mesh.visibility;
+
+        serializationObject.checkCollisions = mesh.checkCollisions;
+
+        // Parent
+        if (mesh.parent) {
+            serializationObject.parentId = mesh.parent.id;
+        }
+
+        // Geometry
+        if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.PositionKind)) {
+            serializationObject.positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);
+            serializationObject.normals = mesh.getVerticesData(BABYLON.VertexBuffer.NormalKind);
+
+            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UVKind)) {
+                serializationObject.uvs = mesh.getVerticesData(BABYLON.VertexBuffer.UVKind);
+            }
+
+            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.UV2Kind)) {
+                serializationObject.uvs2 = mesh.getVerticesData(BABYLON.VertexBuffer.UV2Kind);
+            }
+
+            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.ColorKind)) {
+                serializationObject.colors = mesh.getVerticesData(BABYLON.VertexBuffer.ColorKind);
+            }
+
+            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesWeightsKind)) {
+                serializationObject.matricesWeights = mesh.getVerticesData(BABYLON.VertexBuffer.MatricesWeightsKind);
+            }
+
+            if (mesh.isVerticesDataPresent(BABYLON.VertexBuffer.MatricesIndicesKind)) {
+                serializationObject.matricesWeights = mesh.getVerticesData(BABYLON.VertexBuffer.MatricesIndicesKind);
+                serializationObject.matricesWeights._isExpanded = true;
+            }
+
+            serializationObject.indices = mesh.getIndices();
+
+            // SubMeshes
+            serializationObject.subMeshes = [];
+            for (var subIndex = 0; subIndex < mesh.subMeshes.length; subIndex++) {
+                var subMesh = mesh.subMeshes[subIndex];
+
+                serializationObject.subMeshes.push({
+                    materialIndex: subMesh.materialIndex,
+                    verticesStart: subMesh.verticesStart,
+                    verticesCount: subMesh.verticesCount,
+                    indexStart: subMesh.indexStart,
+                    indexCount: subMesh.indexCount
+                });
+            }
+        }
+
+        // Material
+        if (mesh.material) {
+            serializationObject.materialId = mesh.material.id;
+        } else {
+            mesh.material = null;
+        }
+
+        // Skeleton
+        if (mesh.skeleton) {
+            serializationObject.skeletonId = mesh.skeleton.id;
+        }
+
+        // Physics
+        if (mesh.getPhysicsImpostor() !== BABYLON.PhysicsEngine.NoImpostor) {
+            serializationObject.physicsMass = mesh.getPhysicsMass();
+            serializationObject.physicsFriction = mesh.getPhysicsFriction();
+            serializationObject.physicsRestitution = mesh.getPhysicsRestitution();
+
+            switch (mesh.getPhysicsImpostor()) {
+                case BABYLON.PhysicsEngine.BoxImpostor:
+                    serializationObject.physicsImpostor = 1;
+                    break;
+                case BABYLON.PhysicsEngine.SphereImpostor:
+                    serializationObject.physicsImpostor = 2;
+                    break;
+            }
+        }
+
+        // Animations
+        appendAnimations(mesh, serializationObject);
+
+        return serializationObject;
+    };
 
     BABYLON.SceneSerializer = {
         Serialize: function (scene) {
@@ -249,7 +478,7 @@ var BABYLON = BABYLON || {};
             serializationObject.lights = [];
             for (var index = 0; index < scene.lights.length; index++) {
                 var light = scene.lights[index];
-                
+
                 serializationObject.lights.push(serializeLight(light));
             }
 
@@ -258,7 +487,9 @@ var BABYLON = BABYLON || {};
             for (var index = 0; index < scene.cameras.length; index++) {
                 var camera = scene.cameras[index];
 
-                serializationObject.cameras.push(serializeCamera(camera));
+                if (camera instanceof BABYLON.FreeCamera) {
+                    serializationObject.cameras.push(serializeCamera(camera));
+                }
             }
             if (scene.activecamera) {
                 serializationObject.activeCameraID = scene.activeCamera.id;
@@ -266,10 +497,53 @@ var BABYLON = BABYLON || {};
 
             // Materials
             serializationObject.materials = [];
+            serializationObject.multiMaterials = [];
             for (var index = 0; index < scene.materials.length; index++) {
                 var material = scene.materials[index];
 
-                serializationObject.materials.push(serializeMaterial(material));
+                if (material instanceof BABYLON.StandardMaterial) {
+                    serializationObject.materials.push(serializeMaterial(material));
+                } else if (material instanceof BABYLON.MultiMaterial) {
+                    serializationObject.multiMaterials.push(serializeMultiMaterial(material));
+                }
+            }
+
+            // Skeletons
+            serializationObject.skeletons = [];
+            for (var index = 0; index < scene.skeletons.length; index++) {
+                serializationObject.skeletons.push(serializeSkeleton(scene.skeletons[index]));
+            }
+
+            // Meshes
+            serializationObject.meshes = [];
+            for (var index = 0; index < scene.meshes.length; index++) {
+                var mesh = scene.meshes[index];
+
+                if (mesh.delayLoadState === BABYLON.Engine.DELAYLOADSTATE_LOADED || mesh.delayLoadState === BABYLON.Engine.DELAYLOADSTATE_NONE) {
+                    serializationObject.meshes.push(serializeMesh(mesh));
+                }
+            }
+
+            // Particles Systems
+            serializationObject.particleSystems = [];
+            for (var index = 0; index < scene.particleSystems.length; index++) {
+                serializationObject.particleSystems.push(serializeParticleSystem(scene.particleSystems[index]));
+            }
+
+            // Lens flares
+            serializationObject.lensFlareSystems = [];
+            for (var index = 0; index < scene.lensFlareSystems.length; index++) {
+                serializationObject.lensFlareSystems.push(serializeLensFlareSystem(scene.lensFlareSystems[index]));
+            }
+
+            // Shadows
+            serializationObject.shadowGenerators = [];
+            for (var index = 0; index < scene.lights.length; index++) {
+                var light = scene.lights[index];
+
+                if (light._shadowGenerator) {
+                    serializationObject.shadowGenerators.push(serializeShadowGenerator(light));
+                }
             }
 
             return serializationObject;

+ 8 - 0
Babylon/Tools/babylon.tools.js

@@ -5,6 +5,14 @@ var BABYLON = BABYLON || {};
 (function () {
     BABYLON.Tools = {};
 
+    BABYLON.Tools.GetFilename = function (path) {
+        var index = path.lastIndexOf("/");
+        if (index < 0)
+            return path;
+
+        return path.substring(index + 1);
+    };
+
     BABYLON.Tools.ToDegrees = function(angle) {
         return angle * 180 / Math.PI;
     };

+ 46 - 29
Exporters/Blender/io_export_babylon.py

@@ -25,7 +25,7 @@ from bpy.props import (BoolProperty, FloatProperty, StringProperty, EnumProperty
 from math import radians
 from mathutils import *
 
-MAX_INT = 1000000000
+MAX_VERTICES = 65535
 
 class SubMesh:
     materialIndex = 0
@@ -344,20 +344,21 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
         
         file_handler.write("]}")
 
-    def export_mesh(object, scene, file_handler, multiMaterials, minVertex, maxVertex):
+    def export_mesh(object, scene, file_handler, multiMaterials, startFace, forcedParent, nameID):
         # Get mesh  
         mesh = object.to_mesh(scene, True, "PREVIEW")
         
         # Transform
         loc = mathutils.Vector((0, 0, 0))
-        rot = mathutils.Quaternion((0, 0, 0, 1))
+        rot = mathutils.Quaternion((0, 0, 0, -1))
         scale = mathutils.Vector((1, 1, 1))
         
+        hasSkeleton = False
+
         world = object.matrix_world
         if object.parent and object.parent.type == "ARMATURE" and len(object.vertex_groups) > 0:
             hasSkeleton = True
         else:
-            hasSkeleton = False
             if (object.parent):
                 world = object.parent.matrix_world.inverted() * object.matrix_world
 
@@ -404,7 +405,7 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
         vertices_indices=[]
         subMeshes = []
 
-        finish = True
+        offsetFace = 0
                 
         for v in range(0, len(mesh.vertices)):
             alreadySavedVertices.append(False)
@@ -418,22 +419,23 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
         indicesCount = 0
 
         for materialIndex in range(materialsCount):
+            if offsetFace != 0:
+                break
+
             subMeshes.append(SubMesh())
             subMeshes[materialIndex].materialIndex = materialIndex
             subMeshes[materialIndex].verticesStart = verticesCount
             subMeshes[materialIndex].indexStart = indicesCount
         
-            for face in mesh.tessfaces:  # For each face
-                
+            for faceIndex in range(startFace, len(mesh.tessfaces)):  # For each face
+                face = mesh.tessfaces[faceIndex]
+
                 if face.material_index != materialIndex:
                     continue
 
-                if face.vertices[0] < minVertex and face.vertices[1] < minVertex and face.vertices[2] < minVertex:
-                    continue
-                
-                if face.vertices[0] > maxVertex or face.vertices[1] > maxVertex or face.vertices[2] > maxVertex:
-                    finish = False
-                    continue
+                if verticesCount + 3 > MAX_VERTICES:
+                    offsetFace = faceIndex
+                    break
 
                 for v in range(3): # For each vertex in face
                     vertex_index = face.vertices[v]
@@ -548,7 +550,7 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
                     
             subMeshes[materialIndex].verticesCount = verticesCount - subMeshes[materialIndex].verticesStart
             subMeshes[materialIndex].indexCount = indicesCount - subMeshes[materialIndex].indexStart
-                
+
         positions=positions.rstrip(',')
         normals=normals.rstrip(',')
         indices=indices.rstrip(',')
@@ -579,10 +581,14 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
         # Writing mesh      
         file_handler.write("{")
         
-        Export_babylon.write_string(file_handler, "name", object.name, True)        
-        Export_babylon.write_string(file_handler, "id", object.name)        
-        if object.parent != None:
-            Export_babylon.write_string(file_handler, "parentId", object.parent.name)
+        Export_babylon.write_string(file_handler, "name", object.name + nameID, True)        
+        Export_babylon.write_string(file_handler, "id", object.name + nameID)   
+
+        if forcedParent is None:     
+            if object.parent != None:
+                Export_babylon.write_string(file_handler, "parentId", object.parent.name)
+        else:
+            Export_babylon.write_string(file_handler, "parentId", forcedParent.name)
         
         if len(object.material_slots) == 1:
             material = object.material_slots[0].material
@@ -604,10 +610,16 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
             billboardMode = 0
         else:
             billboardMode = 0
-            
-        Export_babylon.write_vector(file_handler, "position", loc)
-        Export_babylon.write_vectorScaled(file_handler, "rotation", rot.to_euler("XYZ"), -1)
-        Export_babylon.write_vector(file_handler, "scaling", scale)
+        
+        if forcedParent is None:
+            Export_babylon.write_vector(file_handler, "position", loc)
+            Export_babylon.write_vectorScaled(file_handler, "rotation", rot.to_euler("XYZ"), -1)
+            Export_babylon.write_vector(file_handler, "scaling", scale)
+        else:
+            Export_babylon.write_vector(file_handler, "position", mathutils.Vector((0, 0, 0)))
+            Export_babylon.write_vectorScaled(file_handler, "rotation", mathutils.Vector((0, 0, 0)), 1)
+            Export_babylon.write_vector(file_handler, "scaling", mathutils.Vector((1, 1, 1)))
+
         Export_babylon.write_bool(file_handler, "isVisible", object.is_visible(scene))
         Export_babylon.write_bool(file_handler, "isEnabled", True)
         Export_babylon.write_bool(file_handler, "useFlatShading", object.data.useFlatShading)
@@ -703,7 +715,7 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
         # Closing
         file_handler.write("}")
 
-        return finish
+        return offsetFace
 
     def export_node(object, scene, file_handler):
         # Transform
@@ -937,16 +949,21 @@ class Export_babylon(bpy.types.Operator, ExportHelper):
 
                 first = False
                 if object.type == 'MESH':
-                    maxVertex = 65535
-                    minVertex = 0
+                    forcedParent = None
+                    nameID = ""
+                    startFace = 0
 
                     while True:
-                        finish = Export_babylon.export_mesh(object, scene, file_handler, multiMaterials, minVertex, maxVertex)
+                        startFace = Export_babylon.export_mesh(object, scene, file_handler, multiMaterials, startFace, forcedParent, str(nameID))
 
-                        if finish:
+                        if startFace == 0:
                             break
-                        minVertex = maxVertex
-                        maxVertex = minVertex + 65535
+
+                        if forcedParent is None:
+                            nameID = 0
+                            forcedParent = object
+
+                        nameID = nameID + 1
                         file_handler.write(",")
                 else:
                     data_string = Export_babylon.export_node(object, scene, file_handler)

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 22
babylon.1.8.5.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 22 - 0
babylon.1.9.0.js


+ 18 - 0
what's new.md

@@ -1,5 +1,23 @@
 Changes list
 ============
+- 1.9.0:
+ - **Major updates**
+ - Beta support for scene serialization with ```BABYLON.SceneSerializer.Serialize``` function ([deltakosh](http://www.github.com/deltakosh))
+ - Blender exporter now supports 32 bits indices ([deltakosh](http://www.github.com/deltakosh))
+ - Flat shading support (From Blender and with ```mesh.convertToFlatShadedMesh()``) ([deltakosh](http://www.github.com/deltakosh))
+ - **Updates**
+ - New ```mesh.rotate``` and ```mesh.translate``` functions to rotate and translate mesh both locally and globally ([deltakosh](http://www.github.com/deltakosh))
+ - New feature for particles: ```ParticleSystem.forceDepthWrite``` ([deltakosh](http://www.github.com/deltakosh))
+ - Adding a new parameter to pick in order to be able to pick even on multi views ([deltakosh](http://www.github.com/deltakosh))
+ - New ```mesh.lookAt``` function ([professorF](https://github.com/professorF))
+ - New postprocess system (independent from cameras) ([michael-korbas](https://github.com/michael-korbas))
+ - New ```mesh.setAbsolutePosition``` function ([gwenael-hagenmuller](https://github.com/gwenael-hagenmuller))
+ - **Bugfixes**
+ - Fixing issue with ```mesh.infiniteDistance``` ([deltakosh](http://www.github.com/deltakosh))
+ - Fixing issue with camera caches ([deltakosh](http://www.github.com/deltakosh))
+ - Fixing issue with aspect ratio ([deltakosh](http://www.github.com/deltakosh))
+ - Fixing arcRotateCamera angle limitations ([deltakosh](http://www.github.com/deltakosh))
+ - Fixing a bug with multi-views: depth buffer was not clear between different passes ([deltakosh](http://www.github.com/deltakosh))
 - 1.8.5:
  - **Major updates**
  - Visual Studio 2013 templates for Windows 8.1 and nuget packages ([pierlag](http://www.github.com/pierlag))