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

Inconsistencies between Chrome/Firefox and Safari in the Integrated Alerts Decoded Layer #153

Open
luccasmmg opened this issue Feb 22, 2024 · 0 comments

Comments

@luccasmmg
Copy link

luccasmmg commented Feb 22, 2024

It seems that Safari(Webkit) and other browsers have different values for the color.r inside the shaders for decoded layers.

The best way to see this in action is to go to the docs and check the layer there
https://layer-manager-docs.vercel.app/?path=/story/playground-decoded-raster-layer--integrated-alerts

In chrome nothing appears, while in Safari you have a bunch of pink, at first i thought this was maybe a case of the decodedParams being wrong, but if i check the GFW code and copy the params for startDayIndex and endDayIndex to something a little more correct, in chrome everything appears fine, but Safari then barely shows anything

Chrome

image

Safari

image

I tried digging a little around the code to find what is the issue, and the most that i found is that this seems to be related to the value returned by color.r

You can see this by changing the decodeFunction to something way simpler like

  float r = color.r * 255.;
  alpha = r;

On Chrome you get something like this

It seems that Safari(Webkit) and other browsers have different values for the color.r inside the shaders for decoded layers.

The best way to see this in action is to go to the docs and check the layer there
https://layer-manager-docs.vercel.app/?path=/story/playground-decoded-raster-layer--integrated-alerts

In chrome nothing appears, while in Safari you have a bunch of pink, at first i thought this was maybe a case of the decodedParams being wrong, but if i check the GFW code and copy the params for startDayIndex and endDayIndex to something a little more correct, in chrome everything appears fine, but Safari then barely shows anything

Chrome

image

Safari

image

I tried digging a little around the code to find what is the issue, and the most that i found is that this seems to be related to the value returned by color.r

You can see this by changing the decodeFunction to something way simpler like

  float r = color.r * 255.;
  alpha = r;

This is a comparission between Chrome/And a Webkit based browser(I dont have a Mac so im testing using Epiphany a linux browser, but on Safari the results should be the same, already tested the docs in Safari)

Screenshot from 2024-02-22 16-11-22

I made this minimum working example here https://webkit-bug-layers.pages.dev/ with the code in here https://github.com/luccasmmg/webkit-bug-layers in case thats helpful

@luccasmmg luccasmmg closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2024
@luccasmmg luccasmmg reopened this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant