-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Bug] Bitmaplayer flickering on zoom #9328
Comments
It also happens using this const layer = new BitmapLayer({
id: 'BitmapLayer',
bounds: bounds: [-123, 37, -122, 38],
image: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-districts.png',
opacity: 0.5,
textureParameters: {
minFilter: 'nearest',
magFilter: 'nearest'
},
pickable: true,
}); but not this const layer = new BitmapLayer({
id: 'BitmapLayer',
bounds: [-122.519, 37.7045, -122.355, 37.829],
image: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-districts.png',
opacity: 0.5,
textureParameters: {
minFilter: 'nearest',
magFilter: 'nearest'
},
pickable: true,
}); So maybe it only happens for larger bounds or has to do with the relationship between bounds and image resolution? |
Does using 'linear' instead of 'nearest' improve it? You want to avoid interpolation for some reason? |
My feeling is that 'linear' just blurs the problem a bit, but it is still there. That is why the bug is better demonstrated without interpolation. And yes, I want to avoid interpolation anyway for my usecase. |
It probably has to do with the LNGLAT system at zoom>12 does not guarantee that points outside of the viewport are projected accurately. In the case of the BitmapLayer, the projected corners of the bound, although invisible, are still used to interpolate the texture coordinates for each fragment. To verify this you can try preproject the bound corners: + const project = new WebMercatorViewport().projectFlat;
const layer = new BitmapLayer({
id: 'BitmapLayer',
- bounds: [-123, 37, -122, 38],
+ coordinateSystem: COORDINATE_SYSTEM.CARTESIAN,
+ bounds: [project([-123, 37]), project([-123, 38]), project([-122, 38]), project([-122, 37])],
image: 'https://dummyimage.com/3200x3100/000/fff'
}); |
@Pessimistress Yes, this does solve the problem! Can we fix that problem inside Bitmaplayer or is your suggestion to always use |
Description
Using
in
Bitmaplayer results in flickering on zoom. See this video:
githubdeckgl.mp4
Flavors
Expected Behavior
Clear shapes without flickering
Steps to Reproduce
Environment
Logs
No response
The text was updated successfully, but these errors were encountered: