visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.14k stars 2.08k forks source link

[Bug]3DTiles Texture render in MapboxLayer error #7079

Open ronancheng opened 2 years ago

ronancheng commented 2 years ago

Description

use MapboxLayer to loader 3dtiles. when the ViewCamera is changing, some tile render white or empty for an instant. After the ViewCamera stoped, the tiles render correctly.And we can see some warning about 'luma.gl: texture: Texture is Non-Power-Of-Two,disabling mipmaping'. Is it for mapboxgl in webgl1.0?(DeckGL react did well)

Flavors

Expected Behavior

No response

Steps to Reproduce

layers () {
  const layer = new MapboxLayer({
    id: 'tile-3d',
    type: Tile3DLayer,
    data: '/mytilest.json',
    loader: Tiles3Dloader,
    loadOptions: {
      tileset: {
        throttleQuests: true
      }
    },
    onTileError: (err) => {
      console.log(err)
    },
    onTilesetLoad: (tileset) => {
      tileset.setProps({ maximumScreenSpaceError: 1 });
    },
    _subLayerProps: {
      'scenegraph': { _lighting: "flat" }
    }
  })
  return layer;
},

this.map.on('load', () => { window.map = this.map

  this.map.addLayer(this.layers)

... }

Environment

Logs

No response

felixpalmer commented 2 years ago

8.3 is quite an old version, can you try with the latest release?

ronancheng commented 2 years ago

8.3 is quite an old version, can you try with the latest release? the same as 8.7.12/

ronancheng commented 2 years ago

@belom88 @Pessimistress I found a same bug on deck.gl/issues#5832 The author said it beacuse first removes the tiles that are not in the view, and then loads new tiles in loaders.gl. But in my demo, deckgl in react did well(without mapboxgl), the bug only happend in MapBoxLayer. If that caused by loaders strategy, that should be the same.