question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WebGL Tiles rendered using alpha-channel in band math do not show up on iOS

See original GitHub issue

The Problem

My project involves requesting png files from a server with rgba-encoded data, which I style client-side. This works beautifully in all browsers on desktop (specifically, MacBook Pro) but fails in iOS.

To Reproduce

I’ve put together a reproduction in this repository, where I have a Mock Service Worker returning an example png, which I pain gray anywhere there is a non-zero value in the blue channel. This is obviously a simplification of the real business logic in my application, but it does reproduce the problem. MSW can be a bit finicky to get working, but a simple npm install && npm start should be enough to reproduce.

Expected behavior The gray streaks representing data should appear on all devices consistently, but it does not on iOS.

Example of expected behavior: image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mike-000commented, Aug 13, 2022

Using a third party PNG parser and loading into data tiles renders correctly plus the current getData() works as expected https://codesandbox.io/s/simple-forked-nxy41s?file=/main.js

1reaction
mike-000commented, Aug 5, 2022

I just ran my CodeSandbox on IOS Safari via BrowserStack. There is a black hole at the top of Everest where the alpha is 0, which does not happen on Windows.

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

`layer.getData()` RGB values corrupted by alpha ... - GitHub
getData() may not return the correct RGB values for tile sources ... WebGL Tiles rendered using alpha-channel in band math do not show...
Read more >
Webgl does not have an alpha background channel on ios safari
I set up a webgl canvas on my page, and used these params at startup: gl = canvas.getContext("webgl", { alpha: true, premultipliedAlpha: ...
Read more >
Safari Technology Preview Release Notes - Apple Developer
Fixed Scroll To Text Fragment indicator to not show through popup layers ... Fixed an issue introduced in Safari Technology Preview 137 where...
Read more >
Beginning WebGL for HTML5 - Springer Link
Trademarked names, logos, and images may appear in this book. Rather than use ... Using mathematics models to render particle systems, terrain, and...
Read more >
Unity 2021.2.0
Android: Sometimes text is not rendered when using OpengLES3 on a Xiaomi ... Android: Added support on Android for split-screen, pop-up and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found