WorldWideTelescope / wwt-webgl-engine

The full WorldWide Telescope rendering engine in JavaScript with WebGL
https://docs.worldwidetelescope.org/webgl-reference/latest/
MIT License
20 stars 10 forks source link

Annotation colors combine incorrectly when stacking, on some systems #254

Open DougBurke opened 1 year ago

DougBurke commented 1 year ago

This may be a consequence of #238 but I haven't been tracking WWT recently so I don't know when it happened.

If I go to

https://cxc.cfa.harvard.edu/csc/wwt.html?ra=266.65392&dec=-28.71981&zoom=6.7909&display=dss&stackid=acisfJ1743231m292120_001

then I see

wwt1

All the polygons (other than the selected one) are meant to be yellow, with the selected polygon being cyan. However, if you look at the center, where things all pike up, you can see lots of colors for these lines, in particular greens, and including purple for some part of the selected outline (although it appears that once the page was screen grabbed the colors tend to become white).

If I "zoom to stack" then I get

wwt2

and you can see that there's a lot less "color contamination", but there's still some.

I don't know how much you can address this, or even how much of it may be my display adaptor (nvidia via nouveau) but thought I'd mention it, as I'm pretty darn sure this is new-ish behavior.

This app uses filled circle annotations, and with opacity set this leads to some fun behavior. For instance if I add sources to this view I get

wwt3

Note that the upper-left region has a lot of purple in it, but these sources are all cyan circles.

If I zoom in - to https://cxc.cfa.harvard.edu/csc/wwt.html?ra=266.48146&dec=-29.00837&zoom=0.0798&display=dss&stackid=acisfJ1743231m292120_001 - and then view sources we get

wwt4

where we can see that

patudom commented 1 year ago

Hopefully Peter and/or Jon will have more insights on this, but In case it's helpful, when I go to those views (with just the yellow/cyan polygons and with the marked sources) on Chrome + macOS Monterey, I don't get any of the purple. I do see the artifacts in the overlapping cyan circles.

Screen Shot 2023-06-02 at 3 32 26 PM Screen Shot 2023-06-02 at 3 29 43 PM
pkgw commented 11 months ago

This must be some kind of fun integer math in the shader when we stack opaque sources. Which may or may not actually be difficult to fix? If it seems new, it's probably related to https://github.com/WorldWideTelescope/wwt-webgl-engine/pull/238 .