CesiumGS / cesium

An open-source JavaScript library for world-class 3D globes and maps :earth_americas:
https://cesium.com/cesiumjs/
Apache License 2.0
12.89k stars 3.48k forks source link

PolylineGlowMaterial rendering on ubuntu 12.04 and firefox 46 #3939

Open YousefED opened 8 years ago

YousefED commented 8 years ago

See the following screenshot:

screenshot

The blue line is thicker than expected (compare with http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polyline.html&label=Geometries). Could you point me in the right direction to further dig into this issue?

YousefED commented 8 years ago

Fyi: seems to be happening in Chrome as well. The GPU is a nvidia GRID K520

YousefED commented 8 years ago

Also tried other ubuntu / linux versions, same result. Any ideas how I can further debug this issue?

hpinkos commented 8 years ago

Thanks @YousefED! I wasn't able to reproduce this on Windows. @mramato can you see if this is a problem on your linux machine?

YousefED commented 7 years ago

I'm able to reproduce this issue on Chrome + Windows when running chrome on OpenGL. E.g.: chrome.exe --use-gl=desktop (see also https://cesiumjs.org/2014/12/01/WebGL-Profiling-Tips/).

Any ideas?

emackey commented 7 years ago

The screenshot looks like it's the correct width, but blending is disabled. The blue RGB values are supposed to extend out that far, but the alpha values are supposed to trail off the further you get from the center of the line, giving it that thinner glow effect.

YousefED commented 7 years ago

Thanks @emackey. Do you think its a driver issue (specific extension that should be supported)? Or a shader issue?

emackey commented 7 years ago

Do other blended primitives work? For example the red and blue ellipses here have 0.5 alpha and are supposed to blend:

http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Circles%20and%20Ellipses.html&label=Geometries

We've had other bugs filed and fixed, particularly in Firefox, related to alpha blending in the past year. I'm wondering if this is a dup of existing blending bugs, or something that can be fixed by a Cesium upgrade?

YousefED commented 7 years ago

The Circles and Ellipses seem to work fine.

Also; I'm testing directly on cesiumjs.org, assuming this runs the latest version of Cesium :)

emackey commented 7 years ago

By "work fine" you mean you can see the ground through translucent ellipses?

What if you modify the red line, adding .withAlpha(0.2), does that blend?

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

var redLine = viewer.entities.add({
    name : 'Red line on the surface',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArray([-75, 35,
                                                        -125, 35]),
        width : 5,
        material : Cesium.Color.RED.withAlpha(0.2)
    }
});

The red line should become almost invisible, as shown below the blue line here:

thinredline

YousefED commented 7 years ago

Red line looks good:

image

emackey commented 7 years ago

I'm baffled by that screenshot that shows translucency working in the red line but not the blue line. Is this only with Desktop OpenGL, not with the default ANGLE renderer? If so that could be an indication of some kind of driver bug. Officially, we tell people to use Cesium with the default browser settings whenever possible. The browser developers put ANGLE there for good reasons.