-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Transparent background regression in 1.10 and new #2866
Comments
Hi! Seeing there was not much activity here and i wanted to use a bit newer versions then 1.9 on our services i have been looking for the change that removed this functionality. After quite some looking around i found it! 😄 If you want to change this directly in the minified build Cesium.js file, you can replace "this.fxaa=!0" with "this.fxaa=0". Kind regards! |
@santilland There's no need to hack Cesium.js for a workaround so simple, just set the value after you construct the widget.
(Also, if you were to hack the minified file, Thanks for tracking down a workaround. |
Hi! Well that happens for over thinking :D that is a far easier approach of course, thanks for that. |
@bagnell since we know it's the fxaa pass, could the problem be that we are not checking if the webGL context was created with |
Once this issue is resolved, check to see if #1921 is fixed. |
I can't get a transparent background with 1.52. Even fix FXAA disabled. There has to be another effect that forces alpha drawing.
Is this still being worked on or shall I post a new issue since this isn't related to FXAA any more? |
@Pheater thanks for brining this up. I took a quick look at the good news is FXAA is no longer the culprit (plus the way to disable it changed a while ago). Now it's HDR that needs to be disabled. Here's a minimum snippet to get things working: //Create the Cesium viewer
var viewer = new Cesium.Viewer('cesiumContainer', {
skyBox : false,
skyAtmosphere: false,
contextOptions : {
webgl: {
alpha: true
}
}
});
//Set the background of the scene to transparent
viewer.scene.backgroundColor = Cesium.Color.TRANSPARENT;
//HDR needs to be disable for transparent backgrounds
viewer.scene.highDynamicRange = false; |
Fantastic. Works great. |
Thanks for pointing this out. Do you think the docs where Another thought: it wouldn't hurt if |
I opened an issue for the recent regression: #7427. |
Here's a simple Sandcastle example that uses the scene.backgroundColor property to make a transparent background (with the underlying yellow div showing through). It works in 1.9 but not in 1.10 or 1.11. Multiple users have ran into this problem: forum post.
JS
javascript
var viewer = new Cesium.Viewer('cesiumContainer', {
skyBox : false,
skyAtmosphere : false,
contextOptions : {
webgl: {
alpha: true
}
}
});
viewer.scene.backgroundColor = Cesium.Color.TRANSPARENT;
The text was updated successfully, but these errors were encountered: