Browse Source

changes to configuration to fit the new extended configuration.

Raanan Weber 7 years ago
parent
commit
09fe444220

BIN
Viewer/dist/assets/environment/Skybox_2.0-256.dds


+ 2 - 2
Viewer/dist/ufoExample.html

@@ -18,9 +18,9 @@
     </head>
 
     <body>
-        <babylon extends="default, shadowDirectionalLight, environmentMap" templates.nav-bar.params.hide-animations="true" templates.nav-bar.params.disable-on-fullscreen="true">
+        <babylon extends="default, shadowDirectionalLight, environmentMap" templates.nav-bar.params.disable-on-fullscreen="true">
             <scene glow="true">
-                <main-color r="0.5" g="0.2" b="0.2"></main-color>
+                <environment-main-color r="0.5" g="0.2" b="0.2"></environment-main-color>
             </scene>
             <model url="https://models.babylonjs.com/ufo.glb">
                 <animation auto-start="true"></animation>

+ 38 - 19
Viewer/src/configuration/configuration.ts

@@ -1,5 +1,19 @@
 import { ITemplateConfiguration } from './../templateManager';
-import { EngineOptions, IGlowLayerOptions } from 'babylonjs';
+import { EngineOptions, IGlowLayerOptions, DepthOfFieldEffectBlurLevel } from 'babylonjs';
+
+export function getConfigurationKey(key: string, configObject: any) {
+    let splits = key.split('.');
+
+    if (splits.length === 0 || !configObject) return false;
+    else if (splits.length === 1) {
+        if (configObject[key] !== undefined) {
+            return configObject[key];
+        }
+    } else {
+        let firstKey = splits.shift();
+        return getConfigurationKey(splits.join("."), configObject[firstKey!])
+    }
+}
 
 export interface ViewerConfiguration {
 
@@ -73,7 +87,7 @@ export interface ViewerConfiguration {
             specular?: { r: number, g: number, b: number };
         }
         hideLoadingDelay?: number;
-        environmentAssetsRootURL?: string;
+        assetsRootURL?: string;
         environmentMap?: {
             /**
              * Environment map texture path in relative to the asset folder.
@@ -90,26 +104,30 @@ export interface ViewerConfiguration {
              */
             tintLevel: number;
         }
-        renderingPipelines?: {
-            default?: boolean | {
-                [propName: string]: any;
-            };
-            standard?: boolean | {
-                [propName: string]: any;
-            };
-            /*lens?: boolean | {
-                [propName: string]: boolean | string | number | undefined;
-            };*/
-            ssao?: boolean | {
-                [propName: string]: any;
-            };
-            ssao2?: boolean | {
-                [propName: string]: any;
-            };
-        }
+        defaultRenderingPipelines?: boolean | IDefaultRenderingPipelineConfiguration;
     }
 }
 
+export interface IDefaultRenderingPipelineConfiguration {
+    sharpenEnabled?: boolean;
+    bloomEnabled?: boolean;
+    bloomThreshold?: number;
+    depthOfFieldEnabled?: boolean;
+    depthOfFieldBlurLevel?: DepthOfFieldEffectBlurLevel;
+    fxaaEnabled?: boolean;
+    imageProcessingEnabled?: boolean;
+    defaultPipelineTextureType?: number;
+    bloomScale?: number;
+    chromaticAberrationEnabled?: boolean;
+    grainEnabled?: boolean;
+    bloomKernel?: number;
+    hardwareScaleLevel?: number;
+    bloomWeight?: number;
+    bllomThreshold?: number;
+    hdr?: boolean;
+    samples?: number;
+}
+
 export interface IModelConfiguration {
     id?: string;
     url?: string;
@@ -210,6 +228,7 @@ export interface ISceneConfiguration {
     debug?: boolean;
     clearColor?: { r: number, g: number, b: number, a: number };
     mainColor?: { r: number, g: number, b: number };
+    environmentMainColor?: { r: number, g: number, b: number };
     imageProcessingConfiguration?: IImageProcessingConfiguration;
     environmentTexture?: string;
     colorGrading?: IColorGradingConfiguration;

+ 12 - 8
Viewer/src/configuration/types/default.ts

@@ -25,10 +25,10 @@ export let defaultConfiguration: ViewerConfiguration = {
             html: require("../../../assets/templates/default/navbar.html"),
             params: {
                 buttons: {
-                    /*"help-button": {
+                    "help-button": {
                         altText: "Help",
                         image: require('../../../assets/img/help-circle.png')
-                    },*/
+                    },
                     "fullscreen-button": {
                         altText: "Fullscreen",
                         image: require('../../../assets/img/fullscreen.png')
@@ -62,13 +62,17 @@ export let defaultConfiguration: ViewerConfiguration = {
     },
     camera: {
         behaviors: {
-            autoRotate: 0,
+            autoRotate: {
+                type: 0
+            },
             framing: {
                 type: 2,
                 zoomOnBoundingInfo: true,
                 zoomStopsAnimation: false
             },
-            bouncing: 1
+            bouncing: {
+                type: 1
+            }
         },
         wheelPrecision: 200,
     },
@@ -77,9 +81,9 @@ export let defaultConfiguration: ViewerConfiguration = {
             url: 'https://playground.babylonjs.com/textures/environment.dds',
             gammaSpace: false
         },*/
-        pbr: true,
+        /*pbr: true,
         blur: 0.7,
-        infiniteDistance: false,
+        infiniteDistance: false,*/
         /*material: {
             imageProcessingConfiguration: {
                 colorCurves: {
@@ -105,10 +109,10 @@ export let defaultConfiguration: ViewerConfiguration = {
         antialiasing: true
     },
     scene: {
-        imageProcessingConfiguration: {
+        /*imageProcessingConfiguration: {
             exposure: 1.4,
             contrast: 1.66,
             toneMappingEnabled: true
-        }
+        }*/
     }
 }

+ 1 - 1
Viewer/src/configuration/types/environmentMap.ts

@@ -2,7 +2,7 @@ import { ViewerConfiguration } from './../configuration';
 
 export const environmentMapConfiguration: ViewerConfiguration = {
     lab: {
-        environmentAssetsRootURL: '/assets/environment/',
+        assetsRootURL: '/assets/environment/',
         environmentMap: {
             texture: 'EnvMap_2.0-256.env',
             rotationY: 0,

+ 213 - 42
Viewer/src/configuration/types/extended.ts

@@ -1,9 +1,46 @@
 import { ViewerConfiguration } from './../configuration';
+import { Tools } from 'babylonjs';
 
 export let extendedConfiguration: ViewerConfiguration = {
     version: "3.2.0",
     extends: "default",
     camera: {
+        "exposure": 3.034578,
+        "fov": 0.7853981633974483,
+        "contrast": 1.6,
+        "toneMappingEnabled": true,
+        "upperBetaLimit": 1.3962634015954636 + Math.PI / 2,
+        "lowerBetaLimit": -1.4835298641951802 + Math.PI / 2,
+        "behaviors": {
+            "framing": {
+                type: 2,
+                "mode": 0,
+                "positionScale": 0.5,
+                "defaultElevation": 0.2617993877991494,
+                "elevationReturnWaitTime": 3000,
+                "elevationReturnTime": 2000,
+                "framingTime": 500,
+                "zoomStopsAnimation": false,
+                "radiusScale": 0.866
+            },
+            "autoRotate": {
+                type: 0,
+                "idleRotationWaitTime": 4000,
+                "idleRotationSpeed": 0.17453292519943295,
+                "idleRotationSpinupTime": 2500,
+                "zoomStopsAnimation": false
+            },
+            bouncing: {
+                type: 1,
+                lowerRadiusTransitionRange: 0.05,
+                upperRadiusTransitionRange: -0.2
+            }
+        },
+        upperRadiusLimit: 5,
+        lowerRadiusLimit: 0.5,
+        "frameOnModelLoad": true,
+        "framingElevation": 0.2617993877991494,
+        "framingRotation": 1.5707963267948966,
         radius: 2,
         alpha: -1.5708,
         beta: Math.PI * 0.5 - 0.2618,
@@ -11,31 +48,147 @@ export let extendedConfiguration: ViewerConfiguration = {
         minZ: 0.1,
         maxZ: 50,
         fovMode: 0,
-        pinchPrecision: 1500
+        pinchPrecision: 1500,
+        panningSensibility: 3000
     },
     lights: {
-        "light1": {
+        light0: {
             type: 0,
-            shadowEnabled: false,
-            position: { x: -1.78, y: 2.298, z: 2.62 },
-            diffuse: { r: 0.8, g: 0.8, b: 0.8 },
-            intensity: 3,
-            intensityMode: 0,
-            radius: 3.135,
+            "frustumEdgeFalloff": 0,
+            "intensity": 7,
+            "intensityMode": 0,
+            "radius": 0.6,
+            "range": 0.6,
+            "spotAngle": 60,
+            "diffuse": {
+                "r": 1,
+                "g": 1,
+                "b": 1
+            },
+            "position": {
+                "x": -2,
+                "y": 2.5,
+                "z": 2
+            },
+            "target": {
+                "x": 0,
+                "y": 0,
+                "z": 0
+            },
+            "enabled": true,
+            "shadowEnabled": true,
+            "shadowBufferSize": 512,
+            "shadowMinZ": 1,
+            "shadowMaxZ": 10,
+            "shadowFieldOfView": 60,
+            "shadowFrustumSize": 2,
+            shadowConfig: {
+                useBlurCloseExponentialShadowMap: true,
+                useKernelBlur: true,
+                blurScale: 1.0,
+                bias: 0.001,
+                depthScale: 50 * (10 - 1),
+                frustumEdgeFalloff: 0
+            }
         },
-        "light3": {
-            type: 2,
-            shadowEnabled: false,
-            position: { x: -4, y: 2, z: -2.23 },
-            diffuse: { r: 0.718, g: 0.772, b: 0.749 },
-            intensity: 2.052,
-            intensityMode: 0,
-            radius: 0.5,
-            spotAngle: 42.85
+        light1: {
+            "type": 0,
+            "frustumEdgeFalloff": 0,
+            "intensity": 7,
+            "intensityMode": 0,
+            "radius": 0.4,
+            "range": 0.4,
+            "spotAngle": 57,
+            "diffuse": {
+                "r": 1,
+                "g": 1,
+                "b": 1
+            },
+            "position": {
+                "x": 4,
+                "y": 3,
+                "z": -0.5
+            },
+            "target": {
+                "x": 0,
+                "y": 0,
+                "z": 0
+            },
+            "enabled": true,
+            "shadowEnabled": false,
+            "shadowBufferSize": 512,
+            "shadowMinZ": 0.2,
+            "shadowMaxZ": 10,
+            "shadowFieldOfView": 28,
+            "shadowFrustumSize": 2
+        },
+        light2: {
+            "type": 0,
+            "frustumEdgeFalloff": 0,
+            "intensity": 1,
+            "intensityMode": 0,
+            "radius": 0.5,
+            "range": 0.5,
+            "spotAngle": 42.85,
+            "diffuse": {
+                "r": 0.8,
+                "g": 0.8,
+                "b": 0.8
+            },
+            "position": {
+                "x": -1,
+                "y": 3,
+                "z": -3
+            },
+            "target": {
+                "x": 0,
+                "y": 0,
+                "z": 0
+            },
+            "enabled": true,
+            "shadowEnabled": false,
+            "shadowBufferSize": 512,
+            "shadowMinZ": 0.2,
+            "shadowMaxZ": 10,
+            "shadowFieldOfView": 45,
+            "shadowFrustumSize": 2
         }
     },
     ground: {
-        receiveShadows: true
+        "shadowLevel": 0.9,
+        texture: "Ground_2.0-1024.png",
+        material: {
+            primaryColorHighlightLevel: 0.035,
+            primaryColorShadowLevel: 0,
+            enableNoise: true,
+            useRGBColor: false,
+            maxSimultaneousLights: 1,
+            diffuseTexture: {
+                gammaSpace: true
+            }
+        },
+        "opacity": 1,
+        "mirror": false,
+        receiveShadows: true,
+        size: 5
+    },
+    skybox: {
+        scale: 11,
+        cubeTexture: {
+            url: "Skybox_2.0-256.dds"
+        },
+        "material": {
+            primaryColorHighlightLevel: 0.03,
+            primaryColorShadowLevel: 0.03,
+            enableNoise: true,
+            useRGBColor: false,
+            reflectionTexture: {
+                gammaSpace: true
+            }
+        }
+    },
+    engine: {
+
     },
     scene: {
         flags: {
@@ -67,25 +220,38 @@ export let extendedConfiguration: ViewerConfiguration = {
             a: 1.0
         },
         imageProcessingConfiguration: {
+            vignetteCentreX: 0,
+            vignetteCentreY: 0,
+            vignetteColor: {
+                r: 0.086,
+                g: 0.184,
+                b: 0.259,
+                a: 1
+            },
+            vignetteWeight: 0.855,
+            vignetteStretch: 0.5,
+            vignetteBlendMode: 0,
+            vignetteCameraFov: 0.7853981633974483,
+            isEnabled: true,
             colorCurves: {
-                shadowsHue: 43.359,
-                shadowsDensity: 1,
-                shadowsSaturation: -25,
-                shadowsExposure: -3.0,
-                midtonesHue: 93.65,
-                midtonesDensity: -15.24,
-                midtonesExposure: 7.37,
-                midtonesSaturation: -15,
-                highlightsHue: 37.2,
-                highlightsDensity: -22.43,
-                highlightsExposure: 45.0,
-                highlightsSaturation: -15
+                shadowsHue: 0,
+                shadowsDensity: 0,
+                shadowsSaturation: 0,
+                shadowsExposure: 0,
+                midtonesHue: 0,
+                midtonesDensity: 0,
+                midtonesExposure: 0,
+                midtonesSaturation: 0,
+                highlightsHue: 0,
+                highlightsDensity: 0,
+                highlightsExposure: 0,
+                highlightsSaturation: 0
             }
         },
         mainColor: {
-            r: 0.7,
-            g: 0.7,
-            b: 0.7
+            "r": 0.8823529411764706,
+            "g": 0.8823529411764706,
+            "b": 0.8823529411764706
         }
     },
     loaderPlugins: {
@@ -97,27 +263,32 @@ export let extendedConfiguration: ViewerConfiguration = {
     model: {
         rotationOffsetAxis: {
             x: 0,
-            y: 1,
+            y: -1,
             z: 0
         },
-        rotationOffsetAngle: 3.66519,
+        rotationOffsetAngle: Tools.ToRadians(210),
         material: {
             directEnabled: true,
             directIntensity: 0.884,
             emissiveIntensity: 1.04,
-            environmentIntensity: 0.868
+            environmentIntensity: 0.6
         },
         normalize: true,
         castShadow: true,
         receiveShadows: true
     },
     lab: {
-        renderingPipelines: {
-            default: {
-                bloomEnabled: true,
-                bloomThreshold: 1.0,
-                fxaaEnabled: true
-            }
+        assetsRootURL: '/assets/environment/',
+        environmentMap: {
+            "texture": "EnvMap_2.0-256.env",
+            "rotationY": 3,
+            "tintLevel": 0.4
+        },
+        defaultRenderingPipelines: {
+            bloomEnabled: true,
+            bloomThreshold: 1.0,
+            fxaaEnabled: true,
+            bloomWeight: 0.05
         }
     }
 }

+ 6 - 6
Viewer/src/labs/viewerLabs.ts

@@ -9,7 +9,7 @@ export class ViewerLabs {
 
     constructor(private _sceneManager: SceneManager) { }
 
-    public environmentAssetsRootURL: string;
+    public assetsRootURL: string;
     public environment: PBREnvironment = {
         //irradiance
         irradiancePolynomialCoefficients: {
@@ -57,7 +57,7 @@ export class ViewerLabs {
             this.environment = EnvironmentDeserializer.Parse(data);
             if (onSuccess) onSuccess(this.environment);
         } else if (typeof data === 'string') {
-            let url = this.getEnvironmentAssetUrl(data);
+            let url = this.getAssetUrl(data);
             this._sceneManager.scene._loadFile(
                 url,
                 (arrayBuffer: ArrayBuffer) => {
@@ -124,15 +124,15 @@ export class ViewerLabs {
      * @param url Asset url
      * @returns The Asset url using the `environmentAssetsRootURL` if the url is not an absolute path.
      */
-    public getEnvironmentAssetUrl(url: string): string {
+    public getAssetUrl(url: string): string {
         let returnUrl = url;
         if (url && url.toLowerCase().indexOf("//") === -1) {
-            if (!this.environmentAssetsRootURL) {
-                Tools.Warn("Please, specify the root url of your assets before loading the configuration (labs.environmentAssetsRootURL) or disable the background through the viewer options.");
+            if (!this.assetsRootURL) {
+                // Tools.Warn("Please, specify the root url of your assets before loading the configuration (labs.environmentAssetsRootURL) or disable the background through the viewer options.");
                 return url;
             }
 
-            returnUrl = this.environmentAssetsRootURL + returnUrl;
+            returnUrl = this.assetsRootURL + returnUrl;
         }
 
         return returnUrl;

+ 0 - 2
Viewer/src/loader/plugins/extendedMaterialLoaderPlugin.ts

@@ -5,8 +5,6 @@ import { Color3, Texture, BaseTexture, Tools, ISceneLoaderPlugin, ISceneLoaderPl
 
 export class ExtendedMaterialLoaderPlugin implements ILoaderPlugin {
 
-    private _model: ViewerModel;
-
     public onMaterialLoaded(baseMaterial: Material) {
         var material = baseMaterial as PBRMaterial;
         material.alphaMode = Engine.ALPHA_PREMULTIPLIED_PORTERDUFF;

+ 1 - 1
Viewer/src/loader/plugins/minecraftLoaderPlugin.ts

@@ -16,7 +16,7 @@ export class MinecraftLoaderPlugin implements ILoaderPlugin {
         this._minecraftEnabled = false;
     }
 
-    public inParsed(data: IGLTFLoaderData) {
+    public onParsed(data: IGLTFLoaderData) {
         if (data && data.json && data.json['meshes'] && data.json['meshes'].length) {
             var meshes = data.json['meshes'] as GLTF2.IMesh[];
             for (var i = 0; i < meshes.length; i++) {

+ 24 - 16
Viewer/src/model/viewerModel.ts

@@ -37,6 +37,8 @@ export class ViewerModel implements IDisposable {
      * This mesh does not(!) exist in the meshes array.
      */
     public rootMesh: AbstractMesh;
+
+    private _pivotMesh: AbstractMesh;
     /**
      * ParticleSystems connected to this model
      */
@@ -92,6 +94,10 @@ export class ViewerModel implements IDisposable {
         this.state = ModelState.INIT;
 
         this.rootMesh = new AbstractMesh("modelRootMesh", this._viewer.sceneManager.scene);
+        this._pivotMesh = new AbstractMesh("pivotMesh", this._viewer.sceneManager.scene);
+        this._pivotMesh.parent = this.rootMesh;
+        // rotate 180, gltf fun
+        this._pivotMesh.rotation.y += Math.PI;
 
         this._animations = [];
         //create a copy of the configuration to make sure it doesn't change even after it is changed in the viewer
@@ -135,7 +141,7 @@ export class ViewerModel implements IDisposable {
      */
     public addMesh(mesh: AbstractMesh, triggerLoaded?: boolean) {
         if (!mesh.parent) {
-            mesh.parent = this.rootMesh;
+            mesh.parent = this._pivotMesh;
         }
         mesh.receiveShadows = !!this.configuration.receiveShadows;
         this._meshes.push(mesh);
@@ -311,7 +317,7 @@ export class ViewerModel implements IDisposable {
             if (parentIndex !== undefined) {
                 meshesToNormalize.push(this._meshes[parentIndex]);
             } else {
-                meshesToNormalize = meshesWithNoParent;
+                meshesToNormalize = [this._pivotMesh];
             }
 
             if (unitSize) {
@@ -328,22 +334,24 @@ export class ViewerModel implements IDisposable {
                     const center = boundingInfo.min.add(halfSizeVec);
                     mesh.position = center.scale(-1);
 
+                    mesh.position.y += halfSizeVec.y;
+
                     // Recompute Info.
                     mesh.computeWorldMatrix(true);
                 });
             }
         } else {
             //center automatically
-            meshesWithNoParent.forEach(mesh => {
-                const boundingInfo = mesh.getHierarchyBoundingVectors(true);
-                const sizeVec = boundingInfo.max.subtract(boundingInfo.min);
-                const halfSizeVec = sizeVec.scale(0.5);
-                const center = boundingInfo.min.add(halfSizeVec);
-                mesh.position = center.scale(-1);
-
-                // Recompute Info.
-                mesh.computeWorldMatrix(true);
-            });
+            //meshesWithNoParent.forEach(mesh => {
+            const boundingInfo = this._pivotMesh.getHierarchyBoundingVectors(true);
+            const sizeVec = boundingInfo.max.subtract(boundingInfo.min);
+            const halfSizeVec = sizeVec.scale(0.5);
+            const center = boundingInfo.min.add(halfSizeVec);
+            this._pivotMesh.position = center.scale(-1);
+
+            // Recompute Info.
+            this._pivotMesh.computeWorldMatrix(true);
+            //});
         }
 
         // position?
@@ -371,7 +379,7 @@ export class ViewerModel implements IDisposable {
                 if (this._modelConfiguration.rotationOffsetAngle) {
                     m.rotate(rotationAxis, this._modelConfiguration.rotationOffsetAngle);
                 }
-            })
+            });
 
         }
 
@@ -385,7 +393,7 @@ export class ViewerModel implements IDisposable {
             });
         }
 
-        let meshes = this.rootMesh.getChildMeshes(false);
+        let meshes = this._pivotMesh.getChildMeshes(false);
         meshes.filter(m => m.material).forEach((mesh) => {
             this._applyModelMaterialConfiguration(mesh.material!);
         });
@@ -418,8 +426,8 @@ export class ViewerModel implements IDisposable {
             if (this._modelConfiguration.material.directEnabled !== undefined) {
                 material.disableLighting = !this._modelConfiguration.material.directEnabled;
             }
-            if (this._viewer.sceneManager.mainColor) {
-                material.reflectionColor = this._viewer.sceneManager.mainColor;
+            if (this._viewer.sceneManager.reflectionColor) {
+                material.reflectionColor = this._viewer.sceneManager.reflectionColor;
             }
         }
         else if (material instanceof BABYLON.MultiMaterial) {

+ 10 - 10
Viewer/src/optimizer/custom/extended.ts

@@ -2,7 +2,7 @@ import { AbstractViewer } from '../../viewer/viewer';
 import { Scalar, DefaultRenderingPipeline } from 'babylonjs';
 
 export function extendedUpgrade(viewer: AbstractViewer): boolean {
-    let pipelineConifg = <DefaultRenderingPipeline>viewer.sceneManager.getActiveRenderingPiplineByName("default");
+    let defaultPipeline = <DefaultRenderingPipeline>viewer.sceneManager.defaultRenderingPipeline;
     // if (!this.Scene.BackgroundHelper) {
     // 	this.Scene.EngineScene.autoClear = false;
     // this.Scene.BackgroundHelper = true;
@@ -22,8 +22,8 @@ export function extendedUpgrade(viewer: AbstractViewer): boolean {
         viewer.sceneManager.groundEnabled = true;
         return false;
     }
-    if (pipelineConifg && !pipelineConifg.fxaaEnabled) {
-        pipelineConifg.fxaaEnabled = true
+    if (defaultPipeline && !viewer.sceneManager.fxaaEnabled) {
+        viewer.sceneManager.fxaaEnabled = true
         return false;
     }
     var hardwareScalingLevel = Math.max(1 / 2, 1 / (window.devicePixelRatio || 2));
@@ -36,8 +36,8 @@ export function extendedUpgrade(viewer: AbstractViewer): boolean {
         viewer.sceneManager.processShadows = true;
         return false;
     }
-    if (pipelineConifg && !pipelineConifg.bloomEnabled) {
-        pipelineConifg.bloomEnabled = true
+    if (defaultPipeline && !viewer.sceneManager.bloomEnabled) {
+        viewer.sceneManager.bloomEnabled = true
         return false;
     }
     if (!viewer.sceneManager.groundMirrorEnabled) {
@@ -48,14 +48,14 @@ export function extendedUpgrade(viewer: AbstractViewer): boolean {
 }
 
 export function extendedDegrade(viewer: AbstractViewer): boolean {
-    let pipelineConifg = <DefaultRenderingPipeline>viewer.sceneManager.getActiveRenderingPiplineByName("default");
+    let defaultPipeline = <DefaultRenderingPipeline>viewer.sceneManager.defaultRenderingPipeline;
 
     if (viewer.sceneManager.groundMirrorEnabled) {
         viewer.sceneManager.groundMirrorEnabled = false;
         return false;
     }
-    if (pipelineConifg && pipelineConifg.bloomEnabled) {
-        pipelineConifg.bloomEnabled = false;
+    if (defaultPipeline && viewer.sceneManager.bloomEnabled) {
+        viewer.sceneManager.bloomEnabled = false;
         return false;
     }
     if (viewer.sceneManager.processShadows) {
@@ -67,8 +67,8 @@ export function extendedDegrade(viewer: AbstractViewer): boolean {
         viewer.engine.setHardwareScalingLevel(scaling);
         return false;
     }
-    if (pipelineConifg && pipelineConifg.fxaaEnabled) {
-        pipelineConifg.fxaaEnabled = false;
+    if (defaultPipeline && viewer.sceneManager.fxaaEnabled) {
+        viewer.sceneManager.fxaaEnabled = false;
         return false;
     }
     if (viewer.sceneManager.groundEnabled) {

File diff suppressed because it is too large
+ 223 - 71
Viewer/src/viewer/sceneManager.ts


File diff suppressed because it is too large
+ 9 - 2
Viewer/src/viewer/viewer.ts