Jelajahi Sumber

imageProcessing done + support for emptyTexture at engine level

David Catuhe 8 tahun lalu
induk
melakukan
a0c4af9dec
42 mengubah file dengan 1076 tambahan dan 707 penghapusan
  1. 210 198
      dist/preview release/babylon.d.ts
  2. 42 42
      dist/preview release/babylon.js
  3. 340 75
      dist/preview release/babylon.max.js
  4. 210 198
      dist/preview release/babylon.module.d.ts
  5. 44 44
      dist/preview release/babylon.worker.js
  6. 2 2
      dist/preview release/gui/babylon.gui.min.js
  7. 3 1
      dist/preview release/loaders/babylon.glTF2FileLoader.d.ts
  8. 38 37
      dist/preview release/loaders/babylon.glTF2FileLoader.js
  9. 1 1
      dist/preview release/loaders/babylon.glTF2FileLoader.min.js
  10. 3 1
      dist/preview release/loaders/babylon.glTFFileLoader.d.ts
  11. 38 37
      dist/preview release/loaders/babylon.glTFFileLoader.js
  12. 2 2
      dist/preview release/loaders/babylon.glTFFileLoader.min.js
  13. 1 0
      dist/preview release/materialsLibrary/babylon.cellMaterial.js
  14. 1 1
      dist/preview release/materialsLibrary/babylon.cellMaterial.min.js
  15. 1 0
      dist/preview release/materialsLibrary/babylon.furMaterial.js
  16. 1 1
      dist/preview release/materialsLibrary/babylon.furMaterial.min.js
  17. 1 0
      dist/preview release/materialsLibrary/babylon.gradientMaterial.js
  18. 1 1
      dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js
  19. 1 0
      dist/preview release/materialsLibrary/babylon.gridMaterial.js
  20. 1 1
      dist/preview release/materialsLibrary/babylon.gridMaterial.min.js
  21. 1 0
      dist/preview release/materialsLibrary/babylon.lavaMaterial.js
  22. 1 1
      dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js
  23. 1 0
      dist/preview release/materialsLibrary/babylon.normalMaterial.js
  24. 1 1
      dist/preview release/materialsLibrary/babylon.normalMaterial.min.js
  25. 1 0
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js
  26. 1 1
      dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js
  27. 1 0
      dist/preview release/materialsLibrary/babylon.simpleMaterial.js
  28. 1 1
      dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js
  29. 1 0
      dist/preview release/materialsLibrary/babylon.skyMaterial.js
  30. 1 1
      dist/preview release/materialsLibrary/babylon.skyMaterial.min.js
  31. 1 0
      dist/preview release/materialsLibrary/babylon.terrainMaterial.js
  32. 1 1
      dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js
  33. 1 0
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js
  34. 1 1
      dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js
  35. 1 0
      dist/preview release/materialsLibrary/babylon.waterMaterial.js
  36. 1 1
      dist/preview release/materialsLibrary/babylon.waterMaterial.min.js
  37. 2 2
      src/PostProcess/babylon.blurPostProcess.ts
  38. 2 2
      src/PostProcess/babylon.fxaaPostProcess.ts
  39. 80 28
      src/PostProcess/babylon.imageProcessingPostProcess.ts
  40. 1 1
      src/PostProcess/babylon.postProcess.ts
  41. 15 22
      src/Shaders/imageProcessing.fragment.fx
  42. 19 2
      src/babylon.engine.ts

+ 210 - 198
dist/preview release/babylon.d.ts

@@ -232,10 +232,12 @@ declare module BABYLON {
         private _bindedRenderFunction;
         private _vaoRecordInProgress;
         private _mustWipeVertexAttributes;
+        private _emptyTexture;
         private _texturesSupported;
         private _textureFormatInUse;
         readonly texturesSupported: Array<string>;
         readonly textureFormatInUse: string;
+        readonly emptyTexture: WebGLTexture;
         /**
          * @constructor
          * @param {HTMLCanvasElement} canvas - the canvas to be used for rendering
@@ -1336,7 +1338,6 @@ declare module BABYLON {
         clipPlane: Plane;
         animationsEnabled: boolean;
         constantlyUpdateMeshUnderPointer: boolean;
-        useRightHandedSystem: boolean;
         hoverCursor: string;
         metadata: any;
         /**
@@ -1475,6 +1476,12 @@ declare module BABYLON {
         private _onKeyDown;
         private _onKeyUp;
         /**
+        * use right-handed coordinate system on this scene.
+        * @type {boolean}
+        */
+        private _useRightHandedSystem;
+        useRightHandedSystem: boolean;
+        /**
         * is fog enabled on this scene.
         * @type {boolean}
         */
@@ -4698,120 +4705,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class BoundingBox implements ICullable {
-        minimum: Vector3;
-        maximum: Vector3;
-        vectors: Vector3[];
-        center: Vector3;
-        centerWorld: Vector3;
-        extendSize: Vector3;
-        extendSizeWorld: Vector3;
-        directions: Vector3[];
-        vectorsWorld: Vector3[];
-        minimumWorld: Vector3;
-        maximumWorld: Vector3;
-        private _worldMatrix;
-        constructor(minimum: Vector3, maximum: Vector3);
-        getWorldMatrix(): Matrix;
-        setWorldMatrix(matrix: Matrix): BoundingBox;
-        _update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        intersectsSphere(sphere: BoundingSphere): boolean;
-        intersectsMinMax(min: Vector3, max: Vector3): boolean;
-        static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
-        static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
-        static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
-        static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
-    }
-}
-
-declare module BABYLON {
-    interface ICullable {
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-    }
-    class BoundingInfo implements ICullable {
-        minimum: Vector3;
-        maximum: Vector3;
-        boundingBox: BoundingBox;
-        boundingSphere: BoundingSphere;
-        private _isLocked;
-        constructor(minimum: Vector3, maximum: Vector3);
-        isLocked: boolean;
-        update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-        _checkCollision(collider: Collider): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
-    }
-}
-
-declare module BABYLON {
-    class BoundingSphere {
-        minimum: Vector3;
-        maximum: Vector3;
-        center: Vector3;
-        radius: number;
-        centerWorld: Vector3;
-        radiusWorld: number;
-        private _tempRadiusVector;
-        constructor(minimum: Vector3, maximum: Vector3);
-        _update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
-    }
-}
-
-declare module BABYLON {
-    class Ray {
-        origin: Vector3;
-        direction: Vector3;
-        length: number;
-        private _edge1;
-        private _edge2;
-        private _pvec;
-        private _tvec;
-        private _qvec;
-        private _tmpRay;
-        private _rayHelper;
-        constructor(origin: Vector3, direction: Vector3, length?: number);
-        intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
-        intersectsBox(box: BoundingBox): boolean;
-        intersectsSphere(sphere: BoundingSphere): boolean;
-        intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
-        intersectsPlane(plane: Plane): number;
-        intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
-        intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
-        private _comparePickingInfo(pickingInfoA, pickingInfoB);
-        private static smallnum;
-        private static rayl;
-        /**
-         * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
-         * @param sega the first point of the segment to test the intersection against
-         * @param segb the second point of the segment to test the intersection against
-         * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
-         * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
-         */
-        intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
-        static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
-        /**
-        * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
-        * transformed to the given world matrix.
-        * @param origin The origin point
-        * @param end The end point
-        * @param world a matrix to transform the ray to. Default is the identity matrix.
-        */
-        static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
-        static Transform(ray: Ray, matrix: Matrix): Ray;
-        static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
-    }
-}
-
-declare module BABYLON {
     class Collider {
         radius: Vector3;
         retry: number;
@@ -5054,6 +4947,120 @@ declare module BABYLON {
     }
 }
 
+declare module BABYLON {
+    class BoundingBox implements ICullable {
+        minimum: Vector3;
+        maximum: Vector3;
+        vectors: Vector3[];
+        center: Vector3;
+        centerWorld: Vector3;
+        extendSize: Vector3;
+        extendSizeWorld: Vector3;
+        directions: Vector3[];
+        vectorsWorld: Vector3[];
+        minimumWorld: Vector3;
+        maximumWorld: Vector3;
+        private _worldMatrix;
+        constructor(minimum: Vector3, maximum: Vector3);
+        getWorldMatrix(): Matrix;
+        setWorldMatrix(matrix: Matrix): BoundingBox;
+        _update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        intersectsSphere(sphere: BoundingSphere): boolean;
+        intersectsMinMax(min: Vector3, max: Vector3): boolean;
+        static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
+        static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
+        static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
+        static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
+    }
+}
+
+declare module BABYLON {
+    interface ICullable {
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+    }
+    class BoundingInfo implements ICullable {
+        minimum: Vector3;
+        maximum: Vector3;
+        boundingBox: BoundingBox;
+        boundingSphere: BoundingSphere;
+        private _isLocked;
+        constructor(minimum: Vector3, maximum: Vector3);
+        isLocked: boolean;
+        update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+        _checkCollision(collider: Collider): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
+    }
+}
+
+declare module BABYLON {
+    class BoundingSphere {
+        minimum: Vector3;
+        maximum: Vector3;
+        center: Vector3;
+        radius: number;
+        centerWorld: Vector3;
+        radiusWorld: number;
+        private _tempRadiusVector;
+        constructor(minimum: Vector3, maximum: Vector3);
+        _update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
+    }
+}
+
+declare module BABYLON {
+    class Ray {
+        origin: Vector3;
+        direction: Vector3;
+        length: number;
+        private _edge1;
+        private _edge2;
+        private _pvec;
+        private _tvec;
+        private _qvec;
+        private _tmpRay;
+        private _rayHelper;
+        constructor(origin: Vector3, direction: Vector3, length?: number);
+        intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
+        intersectsBox(box: BoundingBox): boolean;
+        intersectsSphere(sphere: BoundingSphere): boolean;
+        intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
+        intersectsPlane(plane: Plane): number;
+        intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
+        intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
+        private _comparePickingInfo(pickingInfoA, pickingInfoB);
+        private static smallnum;
+        private static rayl;
+        /**
+         * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
+         * @param sega the first point of the segment to test the intersection against
+         * @param segb the second point of the segment to test the intersection against
+         * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
+         * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
+         */
+        intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
+        static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
+        /**
+        * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
+        * transformed to the given world matrix.
+        * @param origin The origin point
+        * @param end The end point
+        * @param world a matrix to transform the ray to. Default is the identity matrix.
+        */
+        static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
+        static Transform(ray: Ray, matrix: Matrix): Ray;
+        static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
+    }
+}
+
 declare module BABYLON.Debug {
     class AxesViewer {
         private _xline;
@@ -5461,58 +5468,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    interface ISceneLoaderPluginExtensions {
-        [extension: string]: {
-            isBinary: boolean;
-        };
-    }
-    interface ISceneLoaderPlugin {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
-        load: (scene: Scene, data: string, rootUrl: string) => boolean;
-    }
-    interface ISceneLoaderPluginAsync {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
-        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
-    }
-    class SceneLoader {
-        private static _ForceFullSceneLoadingForIncremental;
-        private static _ShowLoadingScreen;
-        static readonly NO_LOGGING: number;
-        static readonly MINIMAL_LOGGING: number;
-        static readonly SUMMARY_LOGGING: number;
-        static readonly DETAILED_LOGGING: number;
-        private static _loggingLevel;
-        static ForceFullSceneLoadingForIncremental: boolean;
-        static ShowLoadingScreen: boolean;
-        static loggingLevel: number;
-        private static _registeredPlugins;
-        private static _getDefaultPlugin();
-        private static _getPluginForExtension(extension);
-        private static _getPluginForFilename(sceneFilename);
-        private static _getDirectLoad(sceneFilename);
-        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
-        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
-        /**
-        * Load a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param engine is the instance of BABYLON.Engine to use to create the scene
-        */
-        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-        /**
-        * Append a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param scene is the instance of BABYLON.Scene to append to
-        */
-        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-    }
-}
-
-declare module BABYLON {
     class DirectionalLight extends Light implements IShadowLight {
         position: Vector3;
         direction: Vector3;
@@ -5904,6 +5859,58 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    interface ISceneLoaderPluginExtensions {
+        [extension: string]: {
+            isBinary: boolean;
+        };
+    }
+    interface ISceneLoaderPlugin {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
+        load: (scene: Scene, data: string, rootUrl: string) => boolean;
+    }
+    interface ISceneLoaderPluginAsync {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
+        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
+    }
+    class SceneLoader {
+        private static _ForceFullSceneLoadingForIncremental;
+        private static _ShowLoadingScreen;
+        static readonly NO_LOGGING: number;
+        static readonly MINIMAL_LOGGING: number;
+        static readonly SUMMARY_LOGGING: number;
+        static readonly DETAILED_LOGGING: number;
+        private static _loggingLevel;
+        static ForceFullSceneLoadingForIncremental: boolean;
+        static ShowLoadingScreen: boolean;
+        static loggingLevel: number;
+        private static _registeredPlugins;
+        private static _getDefaultPlugin();
+        private static _getPluginForExtension(extension);
+        private static _getPluginForFilename(sceneFilename);
+        private static _getDirectLoad(sceneFilename);
+        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
+        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
+        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
+        /**
+        * Load a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param engine is the instance of BABYLON.Engine to use to create the scene
+        */
+        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
+        /**
+        * Append a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param scene is the instance of BABYLON.Scene to append to
+        */
+        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
+    }
+}
+
+declare module BABYLON {
     /**
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
@@ -6841,6 +6848,7 @@ declare module BABYLON {
         MORPHTARGETS_NORMAL: boolean;
         MORPHTARGETS_TANGENT: boolean;
         NUM_MORPH_INFLUENCERS: number;
+        USERIGHTHANDEDSYSTEM: boolean;
         constructor();
         setReflectionMode(modeToEnable: string): void;
     }
@@ -13493,6 +13501,29 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class ReflectionProbe {
+        name: string;
+        private _scene;
+        private _renderTargetTexture;
+        private _projectionMatrix;
+        private _viewMatrix;
+        private _target;
+        private _add;
+        private _attachedMesh;
+        invertYAxis: boolean;
+        position: Vector3;
+        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
+        samples: number;
+        refreshRate: number;
+        getScene(): Scene;
+        readonly cubeTexture: RenderTargetTexture;
+        readonly renderList: AbstractMesh[];
+        attachToMesh(mesh: AbstractMesh): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
     class AnaglyphPostProcess extends PostProcess {
         private _passedProcess;
         constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
@@ -13517,7 +13548,7 @@ declare module BABYLON {
          * Sets the length in pixels of the blur sample region
          */
         kernel: number;
-        constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         protected _updateParameters(): void;
         /**
          * Best kernels are odd numbers that when divided by 2, their integer part is even, so 5, 9 or 13.
@@ -13582,7 +13613,7 @@ declare module BABYLON {
     class FxaaPostProcess extends PostProcess {
         texelWidth: number;
         texelHeight: number;
-        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
     }
 }
 
@@ -13717,7 +13748,7 @@ declare module BABYLON {
 
 declare module BABYLON {
     class ImageProcessingPostProcess extends PostProcess {
-        colorGradingTexture: BaseTexture;
+        private _colorGradingTexture;
         colorGradingWeight: number;
         colorCurves: ColorCurves;
         vignetteStretch: number;
@@ -13725,11 +13756,15 @@ declare module BABYLON {
         vignetteCentreY: number;
         vignetteWeight: number;
         vignetteColor: BABYLON.Color4;
-        vignetteBlendMode: number;
+        private _vignetteBlendMode;
         cameraContrast: number;
         cameraExposureValue: number;
+        private _cameraToneMappingEnabled;
+        colorGradingTexture: BaseTexture;
+        vignetteBlendMode: number;
         cameraToneMappingEnabled: boolean;
-        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
+        protected _updateParameters(): void;
         private static _VIGNETTEMODE_MULTIPLY;
         private static _VIGNETTEMODE_OPAQUE;
         static readonly VIGNETTEMODE_MULTIPLY: number;
@@ -14368,29 +14403,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class ReflectionProbe {
-        name: string;
-        private _scene;
-        private _renderTargetTexture;
-        private _projectionMatrix;
-        private _viewMatrix;
-        private _target;
-        private _add;
-        private _attachedMesh;
-        invertYAxis: boolean;
-        position: Vector3;
-        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
-        samples: number;
-        refreshRate: number;
-        getScene(): Scene;
-        readonly cubeTexture: RenderTargetTexture;
-        readonly renderList: AbstractMesh[];
-        attachToMesh(mesh: AbstractMesh): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class BoundingBoxRenderer {
         frontColor: Color3;
         backColor: Color3;
@@ -16515,9 +16527,6 @@ declare module BABYLON {
     }
 }
 
-declare module BABYLON.Internals {
-}
-
 declare module BABYLON {
     interface IShadowGenerator {
         getShadowMap(): RenderTargetTexture;
@@ -16631,6 +16640,9 @@ declare module BABYLON {
     }
 }
 
+declare module BABYLON.Internals {
+}
+
 declare module BABYLON {
     class BaseTexture {
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;

File diff ditekan karena terlalu besar
+ 42 - 42
dist/preview release/babylon.js


File diff ditekan karena terlalu besar
+ 340 - 75
dist/preview release/babylon.max.js


+ 210 - 198
dist/preview release/babylon.module.d.ts

@@ -232,10 +232,12 @@ declare module BABYLON {
         private _bindedRenderFunction;
         private _vaoRecordInProgress;
         private _mustWipeVertexAttributes;
+        private _emptyTexture;
         private _texturesSupported;
         private _textureFormatInUse;
         readonly texturesSupported: Array<string>;
         readonly textureFormatInUse: string;
+        readonly emptyTexture: WebGLTexture;
         /**
          * @constructor
          * @param {HTMLCanvasElement} canvas - the canvas to be used for rendering
@@ -1336,7 +1338,6 @@ declare module BABYLON {
         clipPlane: Plane;
         animationsEnabled: boolean;
         constantlyUpdateMeshUnderPointer: boolean;
-        useRightHandedSystem: boolean;
         hoverCursor: string;
         metadata: any;
         /**
@@ -1475,6 +1476,12 @@ declare module BABYLON {
         private _onKeyDown;
         private _onKeyUp;
         /**
+        * use right-handed coordinate system on this scene.
+        * @type {boolean}
+        */
+        private _useRightHandedSystem;
+        useRightHandedSystem: boolean;
+        /**
         * is fog enabled on this scene.
         * @type {boolean}
         */
@@ -4698,120 +4705,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class BoundingBox implements ICullable {
-        minimum: Vector3;
-        maximum: Vector3;
-        vectors: Vector3[];
-        center: Vector3;
-        centerWorld: Vector3;
-        extendSize: Vector3;
-        extendSizeWorld: Vector3;
-        directions: Vector3[];
-        vectorsWorld: Vector3[];
-        minimumWorld: Vector3;
-        maximumWorld: Vector3;
-        private _worldMatrix;
-        constructor(minimum: Vector3, maximum: Vector3);
-        getWorldMatrix(): Matrix;
-        setWorldMatrix(matrix: Matrix): BoundingBox;
-        _update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        intersectsSphere(sphere: BoundingSphere): boolean;
-        intersectsMinMax(min: Vector3, max: Vector3): boolean;
-        static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
-        static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
-        static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
-        static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
-    }
-}
-
-declare module BABYLON {
-    interface ICullable {
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-    }
-    class BoundingInfo implements ICullable {
-        minimum: Vector3;
-        maximum: Vector3;
-        boundingBox: BoundingBox;
-        boundingSphere: BoundingSphere;
-        private _isLocked;
-        constructor(minimum: Vector3, maximum: Vector3);
-        isLocked: boolean;
-        update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
-        _checkCollision(collider: Collider): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
-    }
-}
-
-declare module BABYLON {
-    class BoundingSphere {
-        minimum: Vector3;
-        maximum: Vector3;
-        center: Vector3;
-        radius: number;
-        centerWorld: Vector3;
-        radiusWorld: number;
-        private _tempRadiusVector;
-        constructor(minimum: Vector3, maximum: Vector3);
-        _update(world: Matrix): void;
-        isInFrustum(frustumPlanes: Plane[]): boolean;
-        intersectsPoint(point: Vector3): boolean;
-        static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
-    }
-}
-
-declare module BABYLON {
-    class Ray {
-        origin: Vector3;
-        direction: Vector3;
-        length: number;
-        private _edge1;
-        private _edge2;
-        private _pvec;
-        private _tvec;
-        private _qvec;
-        private _tmpRay;
-        private _rayHelper;
-        constructor(origin: Vector3, direction: Vector3, length?: number);
-        intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
-        intersectsBox(box: BoundingBox): boolean;
-        intersectsSphere(sphere: BoundingSphere): boolean;
-        intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
-        intersectsPlane(plane: Plane): number;
-        intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
-        intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
-        private _comparePickingInfo(pickingInfoA, pickingInfoB);
-        private static smallnum;
-        private static rayl;
-        /**
-         * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
-         * @param sega the first point of the segment to test the intersection against
-         * @param segb the second point of the segment to test the intersection against
-         * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
-         * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
-         */
-        intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
-        static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
-        /**
-        * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
-        * transformed to the given world matrix.
-        * @param origin The origin point
-        * @param end The end point
-        * @param world a matrix to transform the ray to. Default is the identity matrix.
-        */
-        static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
-        static Transform(ray: Ray, matrix: Matrix): Ray;
-        static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
-    }
-}
-
-declare module BABYLON {
     class Collider {
         radius: Vector3;
         retry: number;
@@ -5054,6 +4947,120 @@ declare module BABYLON {
     }
 }
 
+declare module BABYLON {
+    class BoundingBox implements ICullable {
+        minimum: Vector3;
+        maximum: Vector3;
+        vectors: Vector3[];
+        center: Vector3;
+        centerWorld: Vector3;
+        extendSize: Vector3;
+        extendSizeWorld: Vector3;
+        directions: Vector3[];
+        vectorsWorld: Vector3[];
+        minimumWorld: Vector3;
+        maximumWorld: Vector3;
+        private _worldMatrix;
+        constructor(minimum: Vector3, maximum: Vector3);
+        getWorldMatrix(): Matrix;
+        setWorldMatrix(matrix: Matrix): BoundingBox;
+        _update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        intersectsSphere(sphere: BoundingSphere): boolean;
+        intersectsMinMax(min: Vector3, max: Vector3): boolean;
+        static Intersects(box0: BoundingBox, box1: BoundingBox): boolean;
+        static IntersectsSphere(minPoint: Vector3, maxPoint: Vector3, sphereCenter: Vector3, sphereRadius: number): boolean;
+        static IsCompletelyInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
+        static IsInFrustum(boundingVectors: Vector3[], frustumPlanes: Plane[]): boolean;
+    }
+}
+
+declare module BABYLON {
+    interface ICullable {
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+    }
+    class BoundingInfo implements ICullable {
+        minimum: Vector3;
+        maximum: Vector3;
+        boundingBox: BoundingBox;
+        boundingSphere: BoundingSphere;
+        private _isLocked;
+        constructor(minimum: Vector3, maximum: Vector3);
+        isLocked: boolean;
+        update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        isCompletelyInFrustum(frustumPlanes: Plane[]): boolean;
+        _checkCollision(collider: Collider): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        intersects(boundingInfo: BoundingInfo, precise: boolean): boolean;
+    }
+}
+
+declare module BABYLON {
+    class BoundingSphere {
+        minimum: Vector3;
+        maximum: Vector3;
+        center: Vector3;
+        radius: number;
+        centerWorld: Vector3;
+        radiusWorld: number;
+        private _tempRadiusVector;
+        constructor(minimum: Vector3, maximum: Vector3);
+        _update(world: Matrix): void;
+        isInFrustum(frustumPlanes: Plane[]): boolean;
+        intersectsPoint(point: Vector3): boolean;
+        static Intersects(sphere0: BoundingSphere, sphere1: BoundingSphere): boolean;
+    }
+}
+
+declare module BABYLON {
+    class Ray {
+        origin: Vector3;
+        direction: Vector3;
+        length: number;
+        private _edge1;
+        private _edge2;
+        private _pvec;
+        private _tvec;
+        private _qvec;
+        private _tmpRay;
+        private _rayHelper;
+        constructor(origin: Vector3, direction: Vector3, length?: number);
+        intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
+        intersectsBox(box: BoundingBox): boolean;
+        intersectsSphere(sphere: BoundingSphere): boolean;
+        intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
+        intersectsPlane(plane: Plane): number;
+        intersectsMesh(mesh: AbstractMesh, fastCheck?: boolean): PickingInfo;
+        intersectsMeshes(meshes: Array<AbstractMesh>, fastCheck?: boolean, results?: Array<PickingInfo>): Array<PickingInfo>;
+        private _comparePickingInfo(pickingInfoA, pickingInfoB);
+        private static smallnum;
+        private static rayl;
+        /**
+         * Intersection test between the ray and a given segment whithin a given tolerance (threshold)
+         * @param sega the first point of the segment to test the intersection against
+         * @param segb the second point of the segment to test the intersection against
+         * @param threshold the tolerance margin, if the ray doesn't intersect the segment but is close to the given threshold, the intersection is successful
+         * @return the distance from the ray origin to the intersection point if there's intersection, or -1 if there's no intersection
+         */
+        intersectionSegment(sega: Vector3, segb: Vector3, threshold: number): number;
+        static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
+        /**
+        * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
+        * transformed to the given world matrix.
+        * @param origin The origin point
+        * @param end The end point
+        * @param world a matrix to transform the ray to. Default is the identity matrix.
+        */
+        static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
+        static Transform(ray: Ray, matrix: Matrix): Ray;
+        static TransformToRef(ray: Ray, matrix: Matrix, result: Ray): void;
+    }
+}
+
 declare module BABYLON.Debug {
     class AxesViewer {
         private _xline;
@@ -5461,58 +5468,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    interface ISceneLoaderPluginExtensions {
-        [extension: string]: {
-            isBinary: boolean;
-        };
-    }
-    interface ISceneLoaderPlugin {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
-        load: (scene: Scene, data: string, rootUrl: string) => boolean;
-    }
-    interface ISceneLoaderPluginAsync {
-        extensions: string | ISceneLoaderPluginExtensions;
-        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
-        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
-    }
-    class SceneLoader {
-        private static _ForceFullSceneLoadingForIncremental;
-        private static _ShowLoadingScreen;
-        static readonly NO_LOGGING: number;
-        static readonly MINIMAL_LOGGING: number;
-        static readonly SUMMARY_LOGGING: number;
-        static readonly DETAILED_LOGGING: number;
-        private static _loggingLevel;
-        static ForceFullSceneLoadingForIncremental: boolean;
-        static ShowLoadingScreen: boolean;
-        static loggingLevel: number;
-        private static _registeredPlugins;
-        private static _getDefaultPlugin();
-        private static _getPluginForExtension(extension);
-        private static _getPluginForFilename(sceneFilename);
-        private static _getDirectLoad(sceneFilename);
-        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
-        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
-        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
-        /**
-        * Load a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param engine is the instance of BABYLON.Engine to use to create the scene
-        */
-        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-        /**
-        * Append a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param scene is the instance of BABYLON.Scene to append to
-        */
-        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-    }
-}
-
-declare module BABYLON {
     class DirectionalLight extends Light implements IShadowLight {
         position: Vector3;
         direction: Vector3;
@@ -5904,6 +5859,58 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    interface ISceneLoaderPluginExtensions {
+        [extension: string]: {
+            isBinary: boolean;
+        };
+    }
+    interface ISceneLoaderPlugin {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
+        load: (scene: Scene, data: string, rootUrl: string) => boolean;
+    }
+    interface ISceneLoaderPluginAsync {
+        extensions: string | ISceneLoaderPluginExtensions;
+        importMeshAsync: (meshesNames: any, scene: Scene, data: any, rootUrl: string, onsuccess: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, onerror: () => void) => void;
+        loadAsync: (scene: Scene, data: string, rootUrl: string, onsuccess: () => void, onerror: () => void) => void;
+    }
+    class SceneLoader {
+        private static _ForceFullSceneLoadingForIncremental;
+        private static _ShowLoadingScreen;
+        static readonly NO_LOGGING: number;
+        static readonly MINIMAL_LOGGING: number;
+        static readonly SUMMARY_LOGGING: number;
+        static readonly DETAILED_LOGGING: number;
+        private static _loggingLevel;
+        static ForceFullSceneLoadingForIncremental: boolean;
+        static ShowLoadingScreen: boolean;
+        static loggingLevel: number;
+        private static _registeredPlugins;
+        private static _getDefaultPlugin();
+        private static _getPluginForExtension(extension);
+        private static _getPluginForFilename(sceneFilename);
+        private static _getDirectLoad(sceneFilename);
+        static GetPluginForExtension(extension: string): ISceneLoaderPlugin | ISceneLoaderPluginAsync;
+        static RegisterPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync): void;
+        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, message: string, exception?: any) => void): void;
+        /**
+        * Load a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param engine is the instance of BABYLON.Engine to use to create the scene
+        */
+        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
+        /**
+        * Append a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param scene is the instance of BABYLON.Scene to append to
+        */
+        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
+    }
+}
+
+declare module BABYLON {
     /**
      * The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT).
      * They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects.
@@ -6841,6 +6848,7 @@ declare module BABYLON {
         MORPHTARGETS_NORMAL: boolean;
         MORPHTARGETS_TANGENT: boolean;
         NUM_MORPH_INFLUENCERS: number;
+        USERIGHTHANDEDSYSTEM: boolean;
         constructor();
         setReflectionMode(modeToEnable: string): void;
     }
@@ -13493,6 +13501,29 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class ReflectionProbe {
+        name: string;
+        private _scene;
+        private _renderTargetTexture;
+        private _projectionMatrix;
+        private _viewMatrix;
+        private _target;
+        private _add;
+        private _attachedMesh;
+        invertYAxis: boolean;
+        position: Vector3;
+        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
+        samples: number;
+        refreshRate: number;
+        getScene(): Scene;
+        readonly cubeTexture: RenderTargetTexture;
+        readonly renderList: AbstractMesh[];
+        attachToMesh(mesh: AbstractMesh): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
     class AnaglyphPostProcess extends PostProcess {
         private _passedProcess;
         constructor(name: string, options: number | PostProcessOptions, rigCameras: Camera[], samplingMode?: number, engine?: Engine, reusable?: boolean);
@@ -13517,7 +13548,7 @@ declare module BABYLON {
          * Sets the length in pixels of the blur sample region
          */
         kernel: number;
-        constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
         protected _updateParameters(): void;
         /**
          * Best kernels are odd numbers that when divided by 2, their integer part is even, so 5, 9 or 13.
@@ -13582,7 +13613,7 @@ declare module BABYLON {
     class FxaaPostProcess extends PostProcess {
         texelWidth: number;
         texelHeight: number;
-        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
     }
 }
 
@@ -13717,7 +13748,7 @@ declare module BABYLON {
 
 declare module BABYLON {
     class ImageProcessingPostProcess extends PostProcess {
-        colorGradingTexture: BaseTexture;
+        private _colorGradingTexture;
         colorGradingWeight: number;
         colorCurves: ColorCurves;
         vignetteStretch: number;
@@ -13725,11 +13756,15 @@ declare module BABYLON {
         vignetteCentreY: number;
         vignetteWeight: number;
         vignetteColor: BABYLON.Color4;
-        vignetteBlendMode: number;
+        private _vignetteBlendMode;
         cameraContrast: number;
         cameraExposureValue: number;
+        private _cameraToneMappingEnabled;
+        colorGradingTexture: BaseTexture;
+        vignetteBlendMode: number;
         cameraToneMappingEnabled: boolean;
-        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
+        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType?: number);
+        protected _updateParameters(): void;
         private static _VIGNETTEMODE_MULTIPLY;
         private static _VIGNETTEMODE_OPAQUE;
         static readonly VIGNETTEMODE_MULTIPLY: number;
@@ -14368,29 +14403,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class ReflectionProbe {
-        name: string;
-        private _scene;
-        private _renderTargetTexture;
-        private _projectionMatrix;
-        private _viewMatrix;
-        private _target;
-        private _add;
-        private _attachedMesh;
-        invertYAxis: boolean;
-        position: Vector3;
-        constructor(name: string, size: number, scene: Scene, generateMipMaps?: boolean);
-        samples: number;
-        refreshRate: number;
-        getScene(): Scene;
-        readonly cubeTexture: RenderTargetTexture;
-        readonly renderList: AbstractMesh[];
-        attachToMesh(mesh: AbstractMesh): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
     class BoundingBoxRenderer {
         frontColor: Color3;
         backColor: Color3;
@@ -16515,9 +16527,6 @@ declare module BABYLON {
     }
 }
 
-declare module BABYLON.Internals {
-}
-
 declare module BABYLON {
     interface IShadowGenerator {
         getShadowMap(): RenderTargetTexture;
@@ -16631,6 +16640,9 @@ declare module BABYLON {
     }
 }
 
+declare module BABYLON.Internals {
+}
+
 declare module BABYLON {
     class BaseTexture {
         static DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number;

File diff ditekan karena terlalu besar
+ 44 - 44
dist/preview release/babylon.worker.js


File diff ditekan karena terlalu besar
+ 2 - 2
dist/preview release/gui/babylon.gui.min.js


+ 3 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.d.ts

@@ -290,7 +290,8 @@ declare module BABYLON.GLTF2 {
         };
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         static LoadMaterial(runtime: IGLTFRuntime, index: number): IGLTFMaterial;
-        static LoadMetallicRoughnessMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
+        static LoadCoreMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
+        private static _loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, onSuccess, onError);
         static LoadCommonMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
         static LoadAlphaProperties(runtime: IGLTFRuntime, material: IGLTFMaterial): void;
         static LoadTextureAsync(runtime: IGLTFRuntime, textureInfo: IGLTFTextureInfo, onSuccess: (babylonTexture: Texture) => void, onError: () => void): void;
@@ -365,6 +366,7 @@ declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     abstract class GLTFLoaderExtension {
         private _name;
+        enabled: boolean;
         constructor(name: string);
         readonly name: string;
         protected postCreateRuntime(runtime: IGLTFRuntime): void;

+ 38 - 37
dist/preview release/loaders/babylon.glTF2FileLoader.js

@@ -687,7 +687,6 @@ var BABYLON;
             var verticesCounts = [];
             var indexStarts = [];
             var indexCounts = [];
-            var morphTargetManager;
             // Positions, normals and UVs
             for (var primitiveIndex = 0; primitiveIndex < mesh.primitives.length; primitiveIndex++) {
                 // Temporary vertex data
@@ -737,7 +736,6 @@ var BABYLON;
                 if (accessor) {
                     buffer = GLTF2.GLTFUtils.GetBufferFromAccessor(runtime, accessor);
                     tempVertexData.indices = buffer;
-                    indexCounts.push(tempVertexData.indices.length);
                 }
                 else {
                     // Set indices on the fly
@@ -745,8 +743,8 @@ var BABYLON;
                     for (var index = 0; index < tempVertexData.indices.length; index++) {
                         tempVertexData.indices[index] = index;
                     }
-                    indexCounts.push(tempVertexData.indices.length);
                 }
+                indexCounts.push(tempVertexData.indices.length);
                 vertexData.merge(tempVertexData);
                 tempVertexData = undefined;
                 // Sub material
@@ -804,11 +802,10 @@ var BABYLON;
                             }
                         }
                         if (morph.getPositions()) {
-                            if (!morphTargetManager) {
-                                morphTargetManager = new BABYLON.MorphTargetManager();
-                                babylonMesh.morphTargetManager = morphTargetManager;
+                            if (!babylonMesh.morphTargetManager) {
+                                babylonMesh.morphTargetManager = new BABYLON.MorphTargetManager();
                             }
-                            morphTargetManager.addTarget(morph);
+                            babylonMesh.morphTargetManager.addTarget(morph);
                         }
                         else {
                             BABYLON.Tools.Warn("Not adding morph target '" + morph.name + "' because it has no position data");
@@ -1044,7 +1041,29 @@ var BABYLON;
                 material.babylonMaterial.useScalarInLinearSpace = true;
                 return material;
             };
-            GLTFLoader.LoadMetallicRoughnessMaterialPropertiesAsync = function (runtime, material, onSuccess, onError) {
+            GLTFLoader.LoadCoreMaterialAsync = function (runtime, index, onSuccess, onError) {
+                var material = GLTFLoader.LoadMaterial(runtime, index);
+                if (!material) {
+                    onSuccess();
+                    return;
+                }
+                var metallicRoughnessPropertiesSuccess = false;
+                var commonPropertiesSuccess = false;
+                var checkSuccess = function () {
+                    if (metallicRoughnessPropertiesSuccess && commonPropertiesSuccess) {
+                        onSuccess();
+                    }
+                };
+                GLTFLoader._loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, function () {
+                    metallicRoughnessPropertiesSuccess = true;
+                    checkSuccess();
+                }, onError);
+                GLTFLoader.LoadCommonMaterialPropertiesAsync(runtime, material, function () {
+                    commonPropertiesSuccess = true;
+                    checkSuccess();
+                }, onError);
+            };
+            GLTFLoader._loadMetallicRoughnessMaterialPropertiesAsync = function (runtime, material, onSuccess, onError) {
                 // Ensure metallic workflow
                 material.babylonMaterial.metallic = 1;
                 material.babylonMaterial.roughness = 1;
@@ -1057,8 +1076,8 @@ var BABYLON;
                 // Load Factors
                 //
                 material.babylonMaterial.albedoColor = properties.baseColorFactor ? BABYLON.Color3.FromArray(properties.baseColorFactor) : new BABYLON.Color3(1, 1, 1);
-                material.babylonMaterial.metallic = properties.metallicFactor || 1;
-                material.babylonMaterial.roughness = properties.roughnessFactor || 1;
+                material.babylonMaterial.metallic = properties.metallicFactor === undefined ? 1 : properties.metallicFactor;
+                material.babylonMaterial.roughness = properties.roughnessFactor === undefined ? 1 : properties.roughnessFactor;
                 //
                 // Load Textures
                 //
@@ -1271,16 +1290,12 @@ var BABYLON;
                         skeletons.push(skin.babylonSkeleton);
                     }
                 }
-                // Load buffers, materials, etc.
                 GLTFLoader._loadBuffersAsync(runtime, function () {
                     GLTFLoader._loadMaterialsAsync(runtime, function () {
                         postLoad(runtime);
                         onSuccess(meshes, null, skeletons);
                     }, onError);
                 }, onError);
-                if (BABYLON.GLTFFileLoader.IncrementalLoading && onSuccess) {
-                    onSuccess(meshes, null, skeletons);
-                }
             };
             /**
             * Load scene
@@ -1529,6 +1544,7 @@ var BABYLON;
     (function (GLTF2) {
         var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
+                this.enabled = true;
                 this._name = name;
             }
             Object.defineProperty(GLTFLoaderExtension.prototype, "name", {
@@ -1547,36 +1563,21 @@ var BABYLON;
             GLTFLoaderExtension.PostCreateRuntime = function (runtime) {
                 for (var extensionName in GLTF2.GLTFLoader.Extensions) {
                     var extension = GLTF2.GLTFLoader.Extensions[extensionName];
-                    extension.postCreateRuntime(runtime);
+                    if (extension.enabled) {
+                        extension.postCreateRuntime(runtime);
+                    }
                 }
             };
             GLTFLoaderExtension.LoadMaterialAsync = function (runtime, index, onSuccess, onError) {
                 for (var extensionName in GLTF2.GLTFLoader.Extensions) {
                     var extension = GLTF2.GLTFLoader.Extensions[extensionName];
-                    if (extension.loadMaterialAsync(runtime, index, onSuccess, onError)) {
-                        return;
+                    if (extension.enabled) {
+                        if (extension.loadMaterialAsync(runtime, index, onSuccess, onError)) {
+                            return;
+                        }
                     }
                 }
-                var material = GLTF2.GLTFLoader.LoadMaterial(runtime, index);
-                if (!material) {
-                    onSuccess();
-                    return;
-                }
-                var metallicRoughnessPropertiesSuccess = false;
-                var commonPropertiesSuccess = false;
-                var checkSuccess = function () {
-                    if (metallicRoughnessPropertiesSuccess && commonPropertiesSuccess) {
-                        onSuccess();
-                    }
-                };
-                GLTF2.GLTFLoader.LoadMetallicRoughnessMaterialPropertiesAsync(runtime, material, function () {
-                    metallicRoughnessPropertiesSuccess = true;
-                    checkSuccess();
-                }, onError);
-                GLTF2.GLTFLoader.LoadCommonMaterialPropertiesAsync(runtime, material, function () {
-                    commonPropertiesSuccess = true;
-                    checkSuccess();
-                }, onError);
+                GLTF2.GLTFLoader.LoadCoreMaterialAsync(runtime, index, onSuccess, onError);
             };
             return GLTFLoaderExtension;
         }());

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/loaders/babylon.glTF2FileLoader.min.js


+ 3 - 1
dist/preview release/loaders/babylon.glTFFileLoader.d.ts

@@ -785,7 +785,8 @@ declare module BABYLON.GLTF2 {
         };
         static RegisterExtension(extension: GLTFLoaderExtension): void;
         static LoadMaterial(runtime: IGLTFRuntime, index: number): IGLTFMaterial;
-        static LoadMetallicRoughnessMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
+        static LoadCoreMaterialAsync(runtime: IGLTFRuntime, index: number, onSuccess: () => void, onError: () => void): void;
+        private static _loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, onSuccess, onError);
         static LoadCommonMaterialPropertiesAsync(runtime: IGLTFRuntime, material: IGLTFMaterial, onSuccess: () => void, onError: () => void): void;
         static LoadAlphaProperties(runtime: IGLTFRuntime, material: IGLTFMaterial): void;
         static LoadTextureAsync(runtime: IGLTFRuntime, textureInfo: IGLTFTextureInfo, onSuccess: (babylonTexture: Texture) => void, onError: () => void): void;
@@ -860,6 +861,7 @@ declare module BABYLON.GLTF2 {
 declare module BABYLON.GLTF2 {
     abstract class GLTFLoaderExtension {
         private _name;
+        enabled: boolean;
         constructor(name: string);
         readonly name: string;
         protected postCreateRuntime(runtime: IGLTFRuntime): void;

+ 38 - 37
dist/preview release/loaders/babylon.glTFFileLoader.js

@@ -2837,7 +2837,6 @@ var BABYLON;
             var verticesCounts = [];
             var indexStarts = [];
             var indexCounts = [];
-            var morphTargetManager;
             // Positions, normals and UVs
             for (var primitiveIndex = 0; primitiveIndex < mesh.primitives.length; primitiveIndex++) {
                 // Temporary vertex data
@@ -2887,7 +2886,6 @@ var BABYLON;
                 if (accessor) {
                     buffer = GLTF2.GLTFUtils.GetBufferFromAccessor(runtime, accessor);
                     tempVertexData.indices = buffer;
-                    indexCounts.push(tempVertexData.indices.length);
                 }
                 else {
                     // Set indices on the fly
@@ -2895,8 +2893,8 @@ var BABYLON;
                     for (var index = 0; index < tempVertexData.indices.length; index++) {
                         tempVertexData.indices[index] = index;
                     }
-                    indexCounts.push(tempVertexData.indices.length);
                 }
+                indexCounts.push(tempVertexData.indices.length);
                 vertexData.merge(tempVertexData);
                 tempVertexData = undefined;
                 // Sub material
@@ -2954,11 +2952,10 @@ var BABYLON;
                             }
                         }
                         if (morph.getPositions()) {
-                            if (!morphTargetManager) {
-                                morphTargetManager = new BABYLON.MorphTargetManager();
-                                babylonMesh.morphTargetManager = morphTargetManager;
+                            if (!babylonMesh.morphTargetManager) {
+                                babylonMesh.morphTargetManager = new BABYLON.MorphTargetManager();
                             }
-                            morphTargetManager.addTarget(morph);
+                            babylonMesh.morphTargetManager.addTarget(morph);
                         }
                         else {
                             BABYLON.Tools.Warn("Not adding morph target '" + morph.name + "' because it has no position data");
@@ -3194,7 +3191,29 @@ var BABYLON;
                 material.babylonMaterial.useScalarInLinearSpace = true;
                 return material;
             };
-            GLTFLoader.LoadMetallicRoughnessMaterialPropertiesAsync = function (runtime, material, onSuccess, onError) {
+            GLTFLoader.LoadCoreMaterialAsync = function (runtime, index, onSuccess, onError) {
+                var material = GLTFLoader.LoadMaterial(runtime, index);
+                if (!material) {
+                    onSuccess();
+                    return;
+                }
+                var metallicRoughnessPropertiesSuccess = false;
+                var commonPropertiesSuccess = false;
+                var checkSuccess = function () {
+                    if (metallicRoughnessPropertiesSuccess && commonPropertiesSuccess) {
+                        onSuccess();
+                    }
+                };
+                GLTFLoader._loadMetallicRoughnessMaterialPropertiesAsync(runtime, material, function () {
+                    metallicRoughnessPropertiesSuccess = true;
+                    checkSuccess();
+                }, onError);
+                GLTFLoader.LoadCommonMaterialPropertiesAsync(runtime, material, function () {
+                    commonPropertiesSuccess = true;
+                    checkSuccess();
+                }, onError);
+            };
+            GLTFLoader._loadMetallicRoughnessMaterialPropertiesAsync = function (runtime, material, onSuccess, onError) {
                 // Ensure metallic workflow
                 material.babylonMaterial.metallic = 1;
                 material.babylonMaterial.roughness = 1;
@@ -3207,8 +3226,8 @@ var BABYLON;
                 // Load Factors
                 //
                 material.babylonMaterial.albedoColor = properties.baseColorFactor ? BABYLON.Color3.FromArray(properties.baseColorFactor) : new BABYLON.Color3(1, 1, 1);
-                material.babylonMaterial.metallic = properties.metallicFactor || 1;
-                material.babylonMaterial.roughness = properties.roughnessFactor || 1;
+                material.babylonMaterial.metallic = properties.metallicFactor === undefined ? 1 : properties.metallicFactor;
+                material.babylonMaterial.roughness = properties.roughnessFactor === undefined ? 1 : properties.roughnessFactor;
                 //
                 // Load Textures
                 //
@@ -3421,16 +3440,12 @@ var BABYLON;
                         skeletons.push(skin.babylonSkeleton);
                     }
                 }
-                // Load buffers, materials, etc.
                 GLTFLoader._loadBuffersAsync(runtime, function () {
                     GLTFLoader._loadMaterialsAsync(runtime, function () {
                         postLoad(runtime);
                         onSuccess(meshes, null, skeletons);
                     }, onError);
                 }, onError);
-                if (BABYLON.GLTFFileLoader.IncrementalLoading && onSuccess) {
-                    onSuccess(meshes, null, skeletons);
-                }
             };
             /**
             * Load scene
@@ -3679,6 +3694,7 @@ var BABYLON;
     (function (GLTF2) {
         var GLTFLoaderExtension = (function () {
             function GLTFLoaderExtension(name) {
+                this.enabled = true;
                 this._name = name;
             }
             Object.defineProperty(GLTFLoaderExtension.prototype, "name", {
@@ -3697,36 +3713,21 @@ var BABYLON;
             GLTFLoaderExtension.PostCreateRuntime = function (runtime) {
                 for (var extensionName in GLTF2.GLTFLoader.Extensions) {
                     var extension = GLTF2.GLTFLoader.Extensions[extensionName];
-                    extension.postCreateRuntime(runtime);
+                    if (extension.enabled) {
+                        extension.postCreateRuntime(runtime);
+                    }
                 }
             };
             GLTFLoaderExtension.LoadMaterialAsync = function (runtime, index, onSuccess, onError) {
                 for (var extensionName in GLTF2.GLTFLoader.Extensions) {
                     var extension = GLTF2.GLTFLoader.Extensions[extensionName];
-                    if (extension.loadMaterialAsync(runtime, index, onSuccess, onError)) {
-                        return;
+                    if (extension.enabled) {
+                        if (extension.loadMaterialAsync(runtime, index, onSuccess, onError)) {
+                            return;
+                        }
                     }
                 }
-                var material = GLTF2.GLTFLoader.LoadMaterial(runtime, index);
-                if (!material) {
-                    onSuccess();
-                    return;
-                }
-                var metallicRoughnessPropertiesSuccess = false;
-                var commonPropertiesSuccess = false;
-                var checkSuccess = function () {
-                    if (metallicRoughnessPropertiesSuccess && commonPropertiesSuccess) {
-                        onSuccess();
-                    }
-                };
-                GLTF2.GLTFLoader.LoadMetallicRoughnessMaterialPropertiesAsync(runtime, material, function () {
-                    metallicRoughnessPropertiesSuccess = true;
-                    checkSuccess();
-                }, onError);
-                GLTF2.GLTFLoader.LoadCommonMaterialPropertiesAsync(runtime, material, function () {
-                    commonPropertiesSuccess = true;
-                    checkSuccess();
-                }, onError);
+                GLTF2.GLTFLoader.LoadCoreMaterialAsync(runtime, index, onSuccess, onError);
             };
             return GLTFLoaderExtension;
         }());

File diff ditekan karena terlalu besar
+ 2 - 2
dist/preview release/loaders/babylon.glTFFileLoader.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.cellMaterial.js

@@ -37,6 +37,7 @@ var BABYLON;
             _this.NDOTL = true;
             _this.CUSTOMUSERLIGHTING = true;
             _this.CELLBASIC = true;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.cellMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.furMaterial.js

@@ -36,6 +36,7 @@ var BABYLON;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
             _this.HIGHLEVEL = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.furMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.gradientMaterial.js

@@ -67,6 +67,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gradientMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.gridMaterial.js

@@ -23,6 +23,7 @@ var BABYLON;
             var _this = _super.call(this) || this;
             _this.TRANSPARENT = false;
             _this.FOG = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.gridMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.lavaMaterial.js

@@ -67,6 +67,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.lavaMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.normalMaterial.js

@@ -67,6 +67,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.normalMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.js

@@ -28,6 +28,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.shadowOnlyMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.simpleMaterial.js

@@ -34,6 +34,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.simpleMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.skyMaterial.js

@@ -26,6 +26,7 @@ var BABYLON;
             _this.FOG = false;
             _this.VERTEXCOLOR = false;
             _this.VERTEXALPHA = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.skyMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.terrainMaterial.js

@@ -36,6 +36,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.terrainMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.js

@@ -38,6 +38,7 @@ var BABYLON;
             _this.NUM_BONE_INFLUENCERS = 0;
             _this.BonesPerMesh = 0;
             _this.INSTANCES = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.triPlanarMaterial.min.js


+ 1 - 0
dist/preview release/materialsLibrary/babylon.waterMaterial.js

@@ -40,6 +40,7 @@ var BABYLON;
             _this.FRESNELSEPARATE = false;
             _this.BUMPSUPERIMPOSE = false;
             _this.BUMPAFFECTSREFLECTION = false;
+            _this.USERIGHTHANDEDSYSTEM = false;
             _this.rebuild();
             return _this;
         }

File diff ditekan karena terlalu besar
+ 1 - 1
dist/preview release/materialsLibrary/babylon.waterMaterial.min.js


+ 2 - 2
src/PostProcess/babylon.blurPostProcess.ts

@@ -20,8 +20,8 @@
 			return this._idealKernel;
 		}
 
-        constructor(name: string, public direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean) {
-            super(name, "kernelBlur", ["delta", "direction"], null, options, camera, samplingMode, engine, reusable, null, Engine.TEXTURETYPE_UNSIGNED_INT, "kernelBlur", {varyingCount: 0, depCount: 0}, true);
+        constructor(name: string, public direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
+            super(name, "kernelBlur", ["delta", "direction"], null, options, camera, samplingMode, engine, reusable, null, textureType, "kernelBlur", {varyingCount: 0, depCount: 0}, true);
             this.onApplyObservable.add((effect: Effect) => {
                 effect.setFloat2('delta', (1 / this.width) * this.direction.x, (1 / this.height) * this.direction.y);
             });

+ 2 - 2
src/PostProcess/babylon.fxaaPostProcess.ts

@@ -3,8 +3,8 @@
         public texelWidth: number;
         public texelHeight: number;
 
-        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean) {
-            super(name, "fxaa", ["texelSize"], null, options, camera, samplingMode || BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, reusable);
+        constructor(name: string, options: number | PostProcessOptions, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
+            super(name, "fxaa", ["texelSize"], null, options, camera, samplingMode || BABYLON.Texture.BILINEAR_SAMPLINGMODE, engine, reusable, null, textureType);
 
             this.onSizeChangedObservable.add(() => {
                 this.texelWidth = 1.0 / this.width;

+ 80 - 28
src/PostProcess/babylon.imageProcessingPostProcess.ts

@@ -1,34 +1,73 @@
 module BABYLON {
     export class ImageProcessingPostProcess extends PostProcess {
-		public colorGradingTexture: BaseTexture;
+		private _colorGradingTexture: BaseTexture;
 		public colorGradingWeight: number = 1.0;
 		public colorCurves = new ColorCurves();
 
-		public vignetteStretch: number;
-		public vignetteCentreX: number;
-		public vignetteCentreY: number;
-		public vignetteWeight: number;
+		public vignetteStretch = 0;
+		public vignetteCentreX = 0;
+		public vignetteCentreY = 0;
+		public vignetteWeight = 1.5;
 		public vignetteColor: BABYLON.Color4 = new BABYLON.Color4(0, 0, 0, 0);
-		public vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
+		private _vignetteBlendMode = ImageProcessingPostProcess.VIGNETTEMODE_MULTIPLY;
 
-		public cameraContrast: number;
-		public cameraExposureValue: number;
-		public cameraToneMappingEnabled: boolean;
+		public cameraContrast = 1.0;
+		public cameraExposureValue = 1.5;
+		private _cameraToneMappingEnabled = true;
 
-        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean) {
+        public get colorGradingTexture(): BaseTexture {
+            return this._colorGradingTexture;
+        }
+
+        public set colorGradingTexture(value: BaseTexture) {
+            if (this._colorGradingTexture === value) {
+                return;
+            }
+
+            this._colorGradingTexture = value;
+            this._updateParameters();
+        }
+
+        public get vignetteBlendMode(): number {
+            return this._vignetteBlendMode;
+        }
+
+        public set vignetteBlendMode(value: number) {
+            if (this._vignetteBlendMode === value) {
+                return;
+            }
+
+            this._vignetteBlendMode = value;
+            this._updateParameters();
+        }     
+
+        public get cameraToneMappingEnabled(): boolean {
+            return this._cameraToneMappingEnabled;
+        }
+
+        public set cameraToneMappingEnabled(value: boolean) {
+            if (this._cameraToneMappingEnabled === value) {
+                return;
+            }
+
+            this._cameraToneMappingEnabled = value;
+            this._updateParameters();
+        }               
+
+        constructor(name: string, options: number | PostProcessOptions, camera?: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
             super(name, "imageProcessing", [
                                             'contrast',
                                             'vignetteSettings1',
                                             'vignetteSettings2',
-                                            'vignetteSettings3',
                                             'cameraExposureLinear',
-                                            'toneMappingEnabled',
                                             'vCameraColorCurveNegative',
                                             'vCameraColorCurveNeutral',
                                             'vCameraColorCurvePositive',
-                                            'hasTextureColorTransform',
                                             'colorTransformSettings'                    
-                                            ], ["txColorTransform"], options, camera, samplingMode, engine, reusable);
+                                            ], ["txColorTransform"], options, camera, samplingMode, engine, reusable,
+                                            null, textureType, "postprocess", null, true);
+
+            this._updateParameters();
 
             this.onApply = (effect: Effect) => {
                 let aspectRatio = this.width / this.height;
@@ -49,35 +88,48 @@
                 let vignettePower = -2.0 * this.vignetteWeight;
                 effect.setFloat4('vignetteSettings2', this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);
 
-                effect.setFloat4('vignetteSettings3', 0, 0, 0, this.vignetteBlendMode);
-
-                // Contrast and tonemapping
+                // Contrast and exposure
                 effect.setFloat('contrast', this.cameraContrast);
-
-                effect.setFloat('cameraExposureLinear', Math.pow(2.0, - this.cameraExposureValue) * Math.PI);
-                effect.setFloat('toneMappingEnabled', this.cameraToneMappingEnabled ? 1.0 : 0.0);                
+                effect.setFloat('cameraExposureLinear', Math.pow(2.0, -this.cameraExposureValue) * Math.PI);
                 
                 // Color transform settings
-                let hasColorGradingTexture = (this.colorGradingTexture != null) && this.colorGradingTexture.isReady();
-                effect.setBool('hasTextureColorTransform', hasColorGradingTexture);
-
-                if (hasColorGradingTexture) {
+                if (this._colorGradingTexture) {
                     effect.setTexture('txColorTransform', this.colorGradingTexture);
-                    let textureSize = hasColorGradingTexture ? this.colorGradingTexture.getSize().height : 1.0;
+                    let textureSize = this.colorGradingTexture.getSize().height;
 
                     effect.setFloat4("colorTransformSettings",
                         (textureSize - 1) / textureSize, // textureScale
                         0.5 / textureSize, // textureOffset
                         textureSize, // textureSize
-                        hasColorGradingTexture ? this.colorGradingWeight : 0.0 // weight
+                        this.colorGradingWeight // weight
                     );                
                 }
             };
         }
 
+        protected _updateParameters(): void {
+            var defines = "";
+
+            if (this.colorGradingTexture) {
+                defines = "#define COLORGRADING\r\n";
+            }
+
+            if (this.vignetteBlendMode === ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY) {
+                defines += "#define VIGNETTEBLENDMODEMULTIPLY\r\n";
+            } else {
+                defines += "#define VIGNETTEBLENDMODEOPAQUE\r\n";
+            }
+
+            if (this.cameraToneMappingEnabled) {
+                defines += "#define TONEMAPPING\r\n";
+            }
+
+            this.updateEffect(defines);
+        }
+
         // Statics
-        private static _VIGNETTEMODE_MULTIPLY = 1;
-        private static _VIGNETTEMODE_OPAQUE = 2;
+        private static _VIGNETTEMODE_MULTIPLY = 0;
+        private static _VIGNETTEMODE_OPAQUE = 1;
 
         public static get VIGNETTEMODE_MULTIPLY(): number {
             return ImageProcessingPostProcess._VIGNETTEMODE_MULTIPLY;

+ 1 - 1
src/PostProcess/babylon.postProcess.ts

@@ -276,7 +276,7 @@
         public get isSupported(): boolean {
             return this._effect.isSupported;
         }
-
+        
         public apply(): Effect {
             // Check
             if (!this._effect || !this._effect.isReady())

+ 15 - 22
src/Shaders/imageProcessing.fragment.fx

@@ -8,19 +8,13 @@ const vec3 RGBLuminanceCoefficients = vec3(0.2126, 0.7152, 0.0722);
 uniform float contrast;
 uniform vec4 vignetteSettings1;
 uniform vec4 vignetteSettings2;
-uniform vec4 vignetteSettings3;
 uniform float cameraExposureLinear;
-uniform float toneMappingEnabled;
 uniform vec4 vCameraColorCurveNegative;
 uniform vec4 vCameraColorCurveNeutral;
 uniform vec4 vCameraColorCurvePositive;
-uniform bool hasTextureColorTransform;
 uniform sampler2D txColorTransform;
 uniform vec4 colorTransformSettings;
 
-#define VignetteBlendModeMultiply 0.0
-#define VignetteBlendModeOpaque 1.0
-
 vec3 applyEaseInOut(vec3 x){
 	return x * x * (3.0 - 2.0 * x);
 }
@@ -69,21 +63,20 @@ vec4 applyImageProcessing(vec4 result, vec2 viewportXY){
 	// Interpolate between the artist 'color' and white based on the physical transmission value 'vignette'.
 	vec3 vignetteColor = vignetteSettings2.rgb;
 
-	float vignetteBlendMode = vignetteSettings3.w;
-
-	if (vignetteBlendMode == VignetteBlendModeMultiply) {
-		vec3 vignetteColorMultiplier = mix(vignetteColor, vec3(1, 1, 1), vignette);
-		result.rgb *= vignetteColorMultiplier;
-	}
+#ifdef VIGNETTEBLENDMODEMULTIPLY
+	vec3 vignetteColorMultiplier = mix(vignetteColor, vec3(1, 1, 1), vignette);
+	result.rgb *= vignetteColorMultiplier;
+#endif
 
-	if (vignetteBlendMode == VignetteBlendModeOpaque) {
-		result.rgb = mix(vignetteColor, result.rgb, vignette);
-	}
+#ifdef VIGNETTEBLENDMODEOPAQUE
+	result.rgb = mix(vignetteColor, result.rgb, vignette);
+#endif
 	
+#ifdef TONEMAPPING	
 	float tonemappingCalibration = 1.590579;
-	vec3 tonemapped = 1.0 - exp2(-tonemappingCalibration * result.rgb);
+	result.rgb = 1.0 - exp2(-tonemappingCalibration * result.rgb);
+#endif
 
-	result.rgb = mix(result.rgb, tonemapped, toneMappingEnabled);
 	result.rgb = pow(result.rgb, vec3(GammaEncodePowerApprox));
 	result.rgb = clamp(result.rgb, 0.0, 1.0);
 
@@ -96,12 +89,12 @@ vec4 applyImageProcessing(vec4 result, vec2 viewportXY){
 	}
 
 	// Apply Color Transform
-	if (hasTextureColorTransform) {
-		vec3 colorTransformInput = result.rgb * colorTransformSettings.xxx + colorTransformSettings.yyy;
-		vec3 colorTransformOutput = sampleTexture3D(txColorTransform, colorTransformInput).rgb;
+#ifdef COLORGRADING
+	vec3 colorTransformInput = result.rgb * colorTransformSettings.xxx + colorTransformSettings.yyy;
+	vec3 colorTransformOutput = sampleTexture3D(txColorTransform, colorTransformInput).rgb;
 
-		result.rgb = mix(result.rgb, colorTransformOutput, colorTransformSettings.www);
-	}
+	result.rgb = mix(result.rgb, colorTransformOutput, colorTransformSettings.www);
+#endif
 
 	// Apply Color Curves
 	float luma = dot(result.rgb, RGBLuminanceCoefficients);

+ 19 - 2
src/babylon.engine.ts

@@ -550,6 +550,8 @@
         private _vaoRecordInProgress = false;
         private _mustWipeVertexAttributes = false;
 
+        private _emptyTexture: WebGLTexture;
+
         // Hardware supported Compressed Textures
         private _texturesSupported = new Array<string>();
         private _textureFormatInUse: string;
@@ -562,6 +564,15 @@
             return this._textureFormatInUse;
         }
 
+        // Empty texture
+        public get emptyTexture(): WebGLTexture {
+            if (!this._emptyTexture) {
+                this._emptyTexture = this.createRawTexture(new Uint8Array(4), 1, 1, BABYLON.Engine.TEXTUREFORMAT_RGBA, false, false, BABYLON.Texture.NEAREST_SAMPLINGMODE);
+            }
+
+            return this._emptyTexture;
+        }
+
         /**
          * @constructor
          * @param {HTMLCanvasElement} canvas - the canvas to be used for rendering
@@ -3428,7 +3439,7 @@
 
         private _setTexture(channel: number, texture: BaseTexture): void {
             // Not ready?
-            if (!texture || !texture.isReady()) {
+            if (!texture) {
                 if (this._activeTexturesCache[channel] != null) {
                     this.activateTexture(this._gl["TEXTURE" + channel]);
                     this._bindTextureDirectly(this._gl.TEXTURE_2D, null);
@@ -3448,7 +3459,7 @@
                 return;
             }
 
-            var internalTexture = texture.getInternalTexture();
+            var internalTexture = texture.isReady() ? texture.getInternalTexture() : this.emptyTexture;
 
             if (this._activeTexturesCache[channel] === internalTexture) {
                 return;
@@ -3656,6 +3667,12 @@
 
             this.stopRenderLoop();
 
+            // Empty texture
+            if (this._emptyTexture) {
+                this._releaseTexture(this._emptyTexture);
+                this._emptyTexture = null;
+            }
+
             // Release scenes
             while (this.scenes.length) {
                 this.scenes[0].dispose();