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

HeatmapLayer throws GL_BLEND with floating-point color attachments requires the EXT_float_blend extension #3480

Closed
christianbalderrama opened this issue Aug 22, 2019 · 4 comments
Assignees
Labels

Comments

@christianbalderrama
Copy link

christianbalderrama commented Aug 22, 2019

Description

Implementing the HeatmapLayer doesn't reflect the heatmap and throws warning in the console see logs below.

Repro Steps

    const layers = [
      new HeatmapLayer({
        id: "heatmaplayer",
        data: [{COORDINATES: [-122.42177834, 37.78346622], WEIGHT: 10}],
        getPosition: d => d.COORDINATES,
        getWeight: d => d.WEIGHT,
      }),
    ];
    return (
      <MapGL ...>
        <DeckGL
            viewState={this.state.viewState}
            initialViewState={this.state.viewState}
            controller={{type: MapController}}
            layers={layers}
            onContextMenu={event => event.preventDefault()}
        />
      </MapGL>
    );

Environment:

  • Framework Versions:
    "@deck.gl/aggregation-layers": "^7.2.2",
    "@deck.gl/core": "^7.2.2",
    "@deck.gl/layers": "^7.2.2",
    "@deck.gl/mapbox": "^7.2.2",
    "@deck.gl/react": "^7.2.2",
  • Browser Version: Chrome 75.0.3770.142
  • OS: Xubuntu 18.04 LTS x64

Logs

2TWFwOjE=:1 [.WebGL-0xc881cd8b300]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: GL_BLEND with floating-point color attachments requires the EXT_float_blend extension
@christianbalderrama
Copy link
Author

Screenshot_2019-08-22_09-12-44

This console warning shows in the official documentation and does not reflect the heatmaps as well.

@1chandu 1chandu self-assigned this Aug 22, 2019
@1chandu
Copy link
Contributor

1chandu commented Aug 22, 2019

HeatmapLayer is WebGL2 only for now (support for WebGL1 in future releases), but it should print an error message when run under WebGL2.

One possibility is you are using WebGL2, but EXT_float_blend is not supported, if so we have to add explicit check for it. Can you set luma.log.priority=1 in your chrome browser console and refresh the heatmap documentation page, and copy paste logs here? It should log what kind of WebGL context it is using.

To verify if you have the support, can you go to https://webglreport.com/?v=1 and under WebGL1 and WebGL2 tab, see if EXT_float_blend listed?

@1chandu
Copy link
Contributor

1chandu commented Aug 22, 2019

Filed a bug to Khronos for clarifying this extension page for WebGL2 support :

@1chandu
Copy link
Contributor

1chandu commented Aug 23, 2019

@christianbalderrama , it turns out the EXT_float_blend is not always supported in WebGL2 and this layer requires it. I am making a change to log more meaningful message instead of a crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants