Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 8 years ago
parent
commit
5795deb958
34 changed files with 10492 additions and 10448 deletions
  1. 1712 1713
      dist/preview release/babylon.d.ts
  2. 31 31
      dist/preview release/babylon.js
  3. 5 6
      dist/preview release/babylon.max.js
  4. 1712 1713
      dist/preview release/babylon.module.d.ts
  5. 32 32
      dist/preview release/babylon.worker.js
  6. 3287 3287
      dist/preview release/customConfigurations/minimalViewer/babylon.d.ts
  7. 20 20
      dist/preview release/customConfigurations/minimalViewer/babylon.js
  8. 3287 3287
      dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts
  9. 1 1
      dist/preview release/gui/babylon.gui.min.js
  10. 263 263
      dist/preview release/inspector/babylon.inspector.bundle.js
  11. 3 3
      dist/preview release/inspector/babylon.inspector.min.js
  12. 2 2
      dist/preview release/loaders/babylon.glTF1FileLoader.min.js
  13. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  14. 2 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  15. 1 1
      dist/preview release/loaders/babylon.objFileLoader.min.js
  16. 1 1
      dist/preview release/materialsLibrary/babylon.customMaterial.min.js
  17. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  18. 1 1
      dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js
  19. 1 1
      dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js
  20. 44 51
      inspector/src/tabs/TextureTab.ts
  21. 1 3
      inspector/test/index.js
  22. 41 2
      src/Materials/PBR/babylon.pbrBaseMaterial.ts
  23. 1 1
      src/Materials/PBR/babylon.pbrMaterial.ts
  24. 2 2
      src/Materials/Textures/babylon.baseTexture.ts
  25. 16 6
      src/Shaders/pbr.fragment.fx
  26. 2 2
      src/Tools/babylon.dds.ts
  27. 4 5
      src/babylon.engine.ts
  28. 0 1
      src/babylon.mixins.ts
  29. BIN
      tests/validation/ReferenceImages/advancedShadows.png
  30. BIN
      tests/validation/ReferenceImages/highlights.png
  31. BIN
      tests/validation/ReferenceImages/pbrglossy.png
  32. BIN
      tests/validation/ReferenceImages/pbrrough.png
  33. 13 0
      tests/validation/config.json
  34. 5 9
      what's new.md

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


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


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

@@ -9118,7 +9118,7 @@ var BABYLON;
             }
             scene._addPendingData(texture);
             texture.url = url;
-            texture.noMipmap = noMipmap;
+            texture.generateMipMaps = !noMipmap;
             texture.references = 1;
             texture.samplingMode = samplingMode;
             texture.onLoadedCallbacks = [];
@@ -9749,7 +9749,7 @@ var BABYLON;
             texture.url = rootUrl;
             texture.references = 1;
             texture.onLoadedCallbacks = [];
-            texture.noMipmap = noMipmap;
+            texture.generateMipMaps = !noMipmap;
             var isKTX = false;
             var isDDS = false;
             var lastDot = rootUrl.lastIndexOf('.');
@@ -9897,7 +9897,7 @@ var BABYLON;
             var texture = gl.createTexture();
             texture.isCube = true;
             texture.references = 1;
-            texture.noMipmap = !generateMipMaps;
+            texture.generateMipMaps = generateMipMaps;
             texture.format = format;
             texture.type = type;
             var textureType = this._getWebGLTextureType(type);
@@ -9917,7 +9917,6 @@ var BABYLON;
             if (!isPot) {
                 generateMipMaps = false;
             }
-            texture.generateMipMaps = generateMipMaps;
             // Upload data if needed. The texture won t be ready until then.
             if (data) {
                 this.updateRawCubeTexture(texture, data, format, type, invertY, compression);
@@ -19156,7 +19155,7 @@ var BABYLON;
             var texturesCache = this._scene.getEngine().getLoadedTexturesCache();
             for (var index = 0; index < texturesCache.length; index++) {
                 var texturesCacheEntry = texturesCache[index];
-                if (texturesCacheEntry.url === url && texturesCacheEntry.noMipmap === noMipmap) {
+                if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
                     texturesCache.splice(index, 1);
                     return;
                 }
@@ -19166,7 +19165,7 @@ var BABYLON;
             var texturesCache = this._scene.getEngine().getLoadedTexturesCache();
             for (var index = 0; index < texturesCache.length; index++) {
                 var texturesCacheEntry = texturesCache[index];
-                if (texturesCacheEntry.url === url && texturesCacheEntry.noMipmap === noMipmap) {
+                if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
                     if (!sampling || sampling === texturesCacheEntry.samplingMode) {
                         texturesCacheEntry.references++;
                         return texturesCacheEntry;

File diff suppressed because it is too large
+ 1712 - 1713
dist/preview release/babylon.module.d.ts


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


File diff suppressed because it is too large
+ 3287 - 3287
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


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


File diff suppressed because it is too large
+ 3287 - 3287
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


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


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


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


File diff suppressed because it is too large
+ 2 - 2
dist/preview release/loaders/babylon.glTF1FileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


File diff suppressed because it is too large
+ 2 - 2
dist/preview release/loaders/babylon.glTFFileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/loaders/babylon.objFileLoader.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/materialsLibrary/babylon.customMaterial.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.asciiArtPostProcess.min.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/postProcessesLibrary/babylon.digitalRainPostProcess.min.js


+ 44 - 51
inspector/src/tabs/TextureTab.ts

@@ -95,58 +95,51 @@ module INSPECTOR {
             }
             else if (texture instanceof BABYLON.RenderTargetTexture) {
                 // RenderTarget textures
-                if(texture.activeCamera){
-                    BABYLON.Tools.CreateScreenshotUsingRenderTarget(this._inspector.scene.getEngine(), texture.activeCamera, { precision: 1 }, (data) => img.src = data);
-                }
-                else{
-                    let scene = this._inspector.scene;
-                    let engine = scene.getEngine();
-                    let size = texture.getSize();
+                let scene = this._inspector.scene;
+                let engine = scene.getEngine();
+                let size = texture.getSize();
                     
-                    // Clone the texture
-                    let screenShotTexture = texture.clone();
-                    screenShotTexture.activeCamera = texture.activeCamera;
-                    screenShotTexture.onBeforeRender = texture.onBeforeRender;
-                    screenShotTexture.onAfterRender = texture.onAfterRender;
-                    screenShotTexture.onBeforeRenderObservable = texture.onBeforeRenderObservable;
-                    screenShotTexture.onAfterUnbindObservable = texture.onAfterUnbindObservable;
-
-                    // To display the texture after rendering
-                    screenShotTexture.onAfterRenderObservable.add((faceIndex: number) => {
-                        let targetImg: HTMLImageElement;
-                        switch(faceIndex){
-                            case 0:
-                                targetImg = img;
-                                break;
-                            case 1:
-                                targetImg = img1;
-                                break;
-                            case 2:
-                                targetImg = img2;
-                                break;
-                            case 3:
-                                targetImg = img3;
-                                break;
-                            case 4:
-                                targetImg = img4;
-                                break;
-                            case 5:
-                                targetImg = img5;
-                                break;
-                            default:
-                                targetImg = img;
-                                break;
-
-                        }
-                        BABYLON.Tools.DumpFramebuffer(size.width, size.height, engine,  (data) => targetImg.src = data, "image/png");
-                    });
-
-                    // Render the texture
-                    scene.incrementRenderId();
-                    scene.resetCachedMaterial();
-                    screenShotTexture.render(true);
-                    screenShotTexture.dispose();
-                }
+                // Clone the texture
+                let screenShotTexture = texture.clone();
+                screenShotTexture.activeCamera = texture.activeCamera;
+                screenShotTexture.onBeforeRender = texture.onBeforeRender;
+                screenShotTexture.onAfterRender = texture.onAfterRender;
+                screenShotTexture.onBeforeRenderObservable = texture.onBeforeRenderObservable;
+                
+                // To display the texture after rendering
+                screenShotTexture.onAfterRenderObservable.add((faceIndex: number) => {
+                    let targetImg: HTMLImageElement;
+                    switch(faceIndex){
+                        case 0:
+                            targetImg = img;
+                            break;
+                        case 1:
+                            targetImg = img1;
+                            break;
+                        case 2:
+                            targetImg = img2;
+                            break;
+                        case 3:
+                            targetImg = img3;
+                            break;
+                        case 4:
+                            targetImg = img4;
+                            break;
+                        case 5:
+                            targetImg = img5;
+                            break;
+                        default:
+                            targetImg = img;
+                            break;
+                    }
+                    BABYLON.Tools.DumpFramebuffer(size.width, size.height, engine,  (data) => targetImg.src = data, "image/png");
+                });
+
+                // Render the texture
+                scene.incrementRenderId();
+                scene.resetCachedMaterial();
+                screenShotTexture.render();
+                screenShotTexture.dispose();
             } else if (texture.url) {
                 // If an url is present, the texture is an image
                 img.src = texture.url;

+ 1 - 3
inspector/test/index.js

@@ -260,9 +260,7 @@ var Test = (function () {
 
         // to test reflection prob texture handling
         var probe = new BABYLON.ReflectionProbe("probe", 512, scene);
-        for(let mesh of scene.meshes){
-            probe.renderList.push(mesh);
-        }
+        probe.renderList.push(sphere1);
 
         // gui
         var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture.CreateFullscreenUI("UI");

+ 41 - 2
src/Materials/PBR/babylon.pbrBaseMaterial.ts

@@ -546,7 +546,9 @@
                             return false;
                         }
 
-                        MaterialHelper.PrepareDefinesForMergedUV(this._albedoTexture, defines, "ALBEDO"); 
+                        MaterialHelper.PrepareDefinesForMergedUV(this._albedoTexture, defines, "ALBEDO");
+                    } else {
+                        defines.ALBEDO = false;
                     }
 
                     if (this._ambientTexture && StandardMaterial.AmbientTextureEnabled) {
@@ -556,6 +558,8 @@
 
                         MaterialHelper.PrepareDefinesForMergedUV(this._ambientTexture, defines, "AMBIENT"); 
                         defines.AMBIENTINGRAYSCALE = this._useAmbientInGrayScale;
+                    } else {
+                        defines.AMBIENT = false;
                     }
 
                     if (this._opacityTexture && StandardMaterial.OpacityTextureEnabled) {
@@ -565,6 +569,8 @@
 
                         MaterialHelper.PrepareDefinesForMergedUV(this._opacityTexture, defines, "OPACITY"); 
                         defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;
+                    } else {
+                        defines.OPACITY = false;
                     }
 
                     var reflectionTexture = this._getReflectionTexture();
@@ -623,6 +629,24 @@
                                 }
                             }
                         }
+                    } else {
+                        defines.REFLECTION = false;
+                        defines.REFLECTIONMAP_3D = false;
+                        defines.REFLECTIONMAP_SPHERICAL = false;
+                        defines.REFLECTIONMAP_PLANAR = false;
+                        defines.REFLECTIONMAP_CUBIC = false;
+                        defines.REFLECTIONMAP_PROJECTION = false;
+                        defines.REFLECTIONMAP_SKYBOX = false;
+                        defines.REFLECTIONMAP_EXPLICIT = false;
+                        defines.REFLECTIONMAP_EQUIRECTANGULAR = false;
+                        defines.REFLECTIONMAP_EQUIRECTANGULAR_FIXED = false;
+                        defines.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED = false;
+                        defines.INVERTCUBICMAP = false;
+                        defines.USESPHERICALFROMREFLECTIONMAP = false;
+                        defines.USESPHERICALINFRAGMENT = false;
+                        defines.REFLECTIONMAP_OPPOSITEZ = false;
+                        defines.LODINREFLECTIONALPHA = false;
+                        defines.GAMMAREFLECTION = false;
                     }
 
                     if (this._lightmapTexture && StandardMaterial.LightmapTextureEnabled) {
@@ -632,6 +656,8 @@
 
                         MaterialHelper.PrepareDefinesForMergedUV(this._lightmapTexture, defines, "LIGHTMAP"); 
                         defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;
+                    } else {
+                        defines.LIGHTMAP = false;
                     }
 
                     if (this._emissiveTexture && StandardMaterial.EmissiveTextureEnabled) {
@@ -640,6 +666,8 @@
                         }
 
                         MaterialHelper.PrepareDefinesForMergedUV(this._emissiveTexture, defines, "EMISSIVE");
+                    } else {
+                        defines.EMISSIVE = false;
                     }
 
                     if (StandardMaterial.SpecularTextureEnabled) {
@@ -663,6 +691,8 @@
                             MaterialHelper.PrepareDefinesForMergedUV(this._reflectivityTexture, defines, "REFLECTIVITY");
                             defines.MICROSURFACEFROMREFLECTIVITYMAP = this._useMicroSurfaceFromReflectivityMapAlpha;
                             defines.MICROSURFACEAUTOMATIC = this._useAutoMicroSurfaceFromReflectivityMap;
+                        } else {
+                            defines.REFLECTIVITY = false;
                         }
 
                         if (this._microSurfaceTexture) {
@@ -671,9 +701,14 @@
                             }
 
                             MaterialHelper.PrepareDefinesForMergedUV(this._microSurfaceTexture, defines, "MICROSURFACEMAP");
+                        } else {
+                            defines.MICROSURFACEMAP = false;
                         }
+                    } else {
+                        defines.REFLECTIVITY = false;
+                        defines.MICROSURFACEMAP = false;
                     }
-
+	
                     if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && StandardMaterial.BumpTextureEnabled && !this._disableBumpMap) {
                         // Bump texure can not be none blocking.
                         if (!this._bumpTexture.isReady()) {
@@ -703,6 +738,8 @@
                         }
 
                         defines.USERIGHTHANDEDSYSTEM = scene.useRightHandedSystem;
+                    } else {
+                        defines.BUMP = false;
                     }
 
                     var refractionTexture = this._getRefractionTexture();
@@ -720,6 +757,8 @@
                         if (this._linkRefractionWithTransparency) {
                             defines.LINKREFRACTIONTOTRANSPARENCY = true;
                         }
+                    } else {
+                        defines.REFRACTION = false;
                     }
 
                     if (this._environmentBRDFTexture && StandardMaterial.ReflectionTextureEnabled) {

+ 1 - 1
src/Materials/PBR/babylon.pbrMaterial.ts

@@ -193,7 +193,7 @@
          */
         @serialize()
         @expandToProperty("_markAllSubMeshesAsTexturesDirty")
-        public microSurface = 0.9;
+        public microSurface = 1.0;
 
         /**
          * source material index of refraction (IOR)' / 'destination material IOR.

+ 2 - 2
src/Materials/Textures/babylon.baseTexture.ts

@@ -183,7 +183,7 @@
             for (var index = 0; index < texturesCache.length; index++) {
                 var texturesCacheEntry = texturesCache[index];
 
-                if (texturesCacheEntry.url === url && texturesCacheEntry.noMipmap === noMipmap) {
+                if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
                     texturesCache.splice(index, 1);
                     return;
                 }
@@ -195,7 +195,7 @@
             for (var index = 0; index < texturesCache.length; index++) {
                 var texturesCacheEntry = texturesCache[index];
 
-                if (texturesCacheEntry.url === url && texturesCacheEntry.noMipmap === noMipmap) {
+                if (texturesCacheEntry.url === url && texturesCacheEntry.generateMipMaps === !noMipmap) {
                     if (!sampling || sampling === texturesCacheEntry.samplingMode) {
                         texturesCacheEntry.references++;
                         return texturesCacheEntry;

+ 16 - 6
src/Shaders/pbr.fragment.fx

@@ -688,12 +688,18 @@ void main(void) {
 	vec3 finalSpecular = specularBase;
 	finalSpecular *= surfaceReflectivityColor;
 	finalSpecular = max(finalSpecular, 0.0);
+
+	// Full value needed for alpha.
+	vec3 finalSpecularScaled = finalSpecular * vLightingIntensity.x * vLightingIntensity.w;
 #endif
 
 // _____________________________ Radiance_________________________________________
 #ifdef REFLECTION
 	vec3 finalRadiance = environmentRadiance;
 	finalRadiance *= specularEnvironmentReflectance;
+
+	// Full value needed for alpha. 
+	vec3 finalRadianceScaled = finalRadiance * vLightingIntensity.z;
 #endif
 
 // _____________________________ Refraction ______________________________________
@@ -714,15 +720,15 @@ void main(void) {
 #ifdef ALPHABLEND
 	float luminanceOverAlpha = 0.0;
 	#if	defined(REFLECTION) && defined(RADIANCEOVERALPHA)
-		luminanceOverAlpha += getLuminance(environmentRadiance);
+		luminanceOverAlpha += getLuminance(finalRadianceScaled);
 	#endif
 
 	#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA)
-		luminanceOverAlpha += getLuminance(finalSpecular);
+		luminanceOverAlpha += getLuminance(finalSpecularScaled);
 	#endif
 
 	#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA)
-		alpha = clamp(alpha + luminanceOverAlpha * alpha, 0., 1.);
+		alpha = clamp(alpha + luminanceOverAlpha * luminanceOverAlpha, 0., 1.);
 	#endif
 #endif
 
@@ -734,10 +740,14 @@ void main(void) {
 						finalIrradiance			* ambientOcclusionColor * vLightingIntensity.z +
 #endif
 #ifdef SPECULARTERM
-						finalSpecular			* vLightingIntensity.x * vLightingIntensity.w +
+// Comupted in the previous step to help with alpha luminance.
+//						finalSpecular			* vLightingIntensity.x * vLightingIntensity.w +
+						finalSpecularScaled +
 #endif
 #ifdef REFLECTION
-						finalRadiance			* vLightingIntensity.z +
+// Comupted in the previous step to help with alpha luminance.
+//						finalRadiance			* vLightingIntensity.z +
+						finalRadianceScaled +
 #endif
 #ifdef REFRACTION
 						finalRefraction			* vLightingIntensity.z +
@@ -773,7 +783,7 @@ void main(void) {
 
 #ifdef PREMULTIPLYALPHA
 	// Convert to associative (premultiplied) format if needed.
-	finalColor.rgb *= result.a;
+	finalColor.rgb *= finalColor.a;
 #endif
 
 	gl_FragColor = finalColor;

+ 2 - 2
src/Tools/babylon.dds.ts

@@ -461,7 +461,7 @@
                             dataLength = width * height * 4;
                             var floatArray: ArrayBufferView;
 
-                            if (engine.badOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
+                            if (engine.badOS || engine.badDesktopOS || (!engine.getCaps().textureHalfFloat && !engine.getCaps().textureFloat)) { // Required because iOS has many issues with float and half float generation
                                 if (bpp === 128) {
                                     floatArray = DDSTools._GetFloatAsUIntRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);                                    
                                 }
@@ -476,7 +476,7 @@
                             else {
                                 if (bpp === 128) {
                                     floatArray = DDSTools._GetFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
-                                } else if (bpp === 64 && (!engine.getCaps().textureHalfFloat || engine.badDesktopOS)) { // Let's fallback to full float if not half float or false report of it...
+                                } else if (bpp === 64 && !engine.getCaps().textureHalfFloat) {
                                     floatArray = DDSTools._GetHalfFloatAsFloatRGBAArrayBuffer(width, height, dataOffset, dataLength, arrayBuffer, i);
 
                                     info.textureType = Engine.TEXTURETYPE_FLOAT;

+ 4 - 5
src/babylon.engine.ts

@@ -876,7 +876,7 @@
             this._badOS = regexpBadOs.test(navigator.userAgent);
 
             //Detect if we are running on a faulty buggy OS.
-            var regexpBadDesktopOS = /AppleWebKit.*10.[\d] /
+            var regexpBadDesktopOS = /AppleWebKit.*10.[\d]/
             //ua sniffing is the tool of the devil.
             this._badDesktopOS = regexpBadDesktopOS.test(navigator.userAgent);
 
@@ -2433,7 +2433,7 @@
 
             scene._addPendingData(texture);
             texture.url = url;
-            texture.noMipmap = noMipmap;
+            texture.generateMipMaps = !noMipmap;
             texture.references = 1;
             texture.samplingMode = samplingMode;
             texture.onLoadedCallbacks = [];
@@ -3216,7 +3216,7 @@
             texture.url = rootUrl;
             texture.references = 1;
             texture.onLoadedCallbacks = [];
-            texture.noMipmap = noMipmap;
+            texture.generateMipMaps = !noMipmap;
 
             var isKTX = false;
             var isDDS = false;
@@ -3398,7 +3398,7 @@
             var texture = gl.createTexture();
             texture.isCube = true;
             texture.references = 1;
-            texture.noMipmap = !generateMipMaps;
+            texture.generateMipMaps = generateMipMaps;
             texture.format = format;
             texture.type = type;
 
@@ -3423,7 +3423,6 @@
             if (!isPot) {
                 generateMipMaps = false;
             }
-            texture.generateMipMaps = generateMipMaps;
 
             // Upload data if needed. The texture won t be ready until then.
             if (data) {

+ 0 - 1
src/babylon.mixins.ts

@@ -103,7 +103,6 @@ interface WebGLTexture {
     isReady: boolean;
     isCube: boolean;
     url: string;
-    noMipmap: boolean;
     samplingMode: number;
     references: number;
     generateMipMaps: boolean;

BIN
tests/validation/ReferenceImages/advancedShadows.png


BIN
tests/validation/ReferenceImages/highlights.png


BIN
tests/validation/ReferenceImages/pbrglossy.png


BIN
tests/validation/ReferenceImages/pbrrough.png


+ 13 - 0
tests/validation/config.json

@@ -172,6 +172,19 @@
       "referenceImage": "displacementMap.png",
       "replace": "/Scenes/Customs/skybox/, https://cdn.rawgit.com/BabylonJS/Website/06ecbea7/Assets/skybox/"
     },
+     {
+      "title": "PBR glossy",
+      "scriptToRun": "/Demos/PBRGlossy/index.js",
+      "functionToCall": "CreatePBRGlossyScene",
+      "referenceImage": "pbrglossy.png"
+    },
+    {
+      "title": "PBR rough",
+      "renderCount": 10,
+      "scriptToRun": "/Demos/PBRRough/index.js",
+      "functionToCall": "CreatePBRRoughScene",
+      "referenceImage": "PBRRough.png"
+    },
     {
       "title": "Water material (only visual check)",
       "renderCount": 10,

+ 5 - 9
what's new.md

@@ -1,8 +1,4 @@
-# 3.0.0:
-
-## Core engine
-
-### Major updates
+# Major updates
  - WebGL2 context support. WebGL2 is now used instead of WebGL 1 when available. [More info here](http://doc.babylonjs.com/overviews/webgl2) ([deltakosh](https://github.com/deltakosh))
  - Complete WebVR 1.1 support including controllers for HTC Vive and Occulus. [More info here](http://doc.babylonjs.com/overviews/webvr_camera) ([raanan](https://github.com/raananw) & [davrous](https://github.com/davrous))
  - Complete rewrite of PBRMaterial. Introduced two new helper materials: `pbrMetallicRoughnessMaterial` and `pbrSpecularGlossinessMaterial`. [Demo](http://www.babylonjs.com/demos/pbrglossy/) - [More info here](http://doc.babylonjs.com/overviews/physically_based_rendering) ([Sebastien Vandenberghe](https://github.com/sebavan))
@@ -29,7 +25,7 @@
  - Spector.js New WebGL debugger: [more info here](http://spector.babylonjs.com) ([Sebastien Vandenberghe](https://github.com/sebavan))
  - New blur mode for mirrors. [Demo](https://www.babylonjs-playground.com/#9I6NX1) ([deltakosh](https://github.com/deltakosh)) 
 
-### Updates
+# Updates
 - Added `syncBoneWithImpostor()` and `syncImpostorWithBone()` to PhysicsImpostor to help with creating ragdoll effects. [Demo](http://playground.babylonjs.com/#PM5MFS#5) ([abow](https://github.com/abow))
 - New automatic creation mode for skybox. [Doc here](http://doc.babylonjs.com/tutorials/environment#automatic-creation) ([deltakosh](https://github.com/deltakosh))
 - New way to force compilation of materials. [Doc here](http://doc.babylonjs.com/tutorials/How_materials_work) ([deltakosh](https://github.com/deltakosh))
@@ -77,7 +73,7 @@
 - Allow the BlackAndWhite post process to adjust the degree in subsequent frames, for `Welcome to Wonderland`	types of animation ([jcpalmer](https://github.com/Palmer-JC))
 - New `BABYLON.TextureTools.CreateResizedCopy` function to create a copy of a texture and chage its size ([deltakosh](https://github.com/deltakosh)) 
  
-### Bug fixes
+# Bug fixes
 - Fixed issue with FPS not decreasing when reflections are disabled ([abow](https://github.com/abow)) 
 - Fixed disappearing BoneAxesViewer ([abow](https://github.com/abow)) 
 - Fixed disappearing SkeletonViewer ([abow](https://github.com/abow)) 
@@ -90,7 +86,7 @@
 - Fixed SPS particle access `start` index when used with `setParticles(start, end)` ([jerome](https://github.com/jbousquie))  
 - Fixed SPS billboard mode when used with a parented camera ([jerome](https://github.com/jbousquie)) 
 
-### API Documentation 
+# API Documentation 
 - File `abstractMesh.ts` documented ([jerome](https://github.com/jbousquie))  
 - File `mesh.ts` documented ([jerome](https://github.com/jbousquie))  
 - File `groundMesh.ts` documented ([jerome](https://github.com/jbousquie))  
@@ -107,7 +103,7 @@
 - File `spotLight.ts` documented ([jerome](https://github.com/jbousquie))  
 - File `shadowGenerator.ts` documented ([jerome](https://github.com/jbousquie))  
 
-### Breaking changes
+# Breaking changes
 - WebVRCamera:
   - `requestVRFullscreen` has been removed. Call `attachControl()` inside a user-interaction callback to start sending frames to the VR display
   - `setPositionOffset` has been used to change the position offset. it is now done using `camera.position`