Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translucent rectangles very slow when switching to 2D #7018

Closed
likangning93 opened this issue Sep 7, 2018 · 2 comments
Closed

Translucent rectangles very slow when switching to 2D #7018

likangning93 opened this issue Sep 7, 2018 · 2 comments

Comments

@likangning93
Copy link
Contributor

likangning93 commented Sep 7, 2018

Rendering several stacked translucent rectangles seems to severely decrease scene performance, but only when switching to 2D from other scene modes - starting the scene in 2D doesn't seem to have the same performance drop.

I'm not seeing the same performance drop in 1.49 as in master (42 -> 30 FPS vs. 42 -> 14 FPS), so this seems like a recent regression as opposed to a bug we never found before.

var viewer = new Cesium.Viewer('cesiumContainer');

viewer.scene.debugShowFramesPerSecond = true;

// Tropics of Cancer and Capricorn
var coffeeBeltRectangle = Cesium.Rectangle.fromDegrees(-180, -23.43687, 180, 23.43687);

// Add rectangles to show bounds
var rectangles = [];

for (var i = 0; i < 10; i++) {
    rectangles.push(viewer.entities.add({
        rectangle : {
            coordinates : coffeeBeltRectangle,
            material : Cesium.Color.RED.withAlpha(0.1),
            height : i * 5000.0
        }
    }));
}

Sandcastle.addToolbarButton('Show/Hide Rectangles', function() {
    var rectanglesLength = rectangles.length;
    for (var i = 0; i < rectanglesLength; i++) {
        var rectangleEntity = rectangles[i];
        rectangleEntity.show = !rectangleEntity.show;
    }
});
@hpinkos
Copy link
Contributor

hpinkos commented Sep 7, 2018

Related? #5026

@lilleyse
Copy link
Contributor

lilleyse commented Sep 7, 2018

git bisect points to 4633ea6. I'll look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants