Skip to content

Conversation

@donmccurdy
Copy link
Collaborator

@donmccurdy donmccurdy commented Jan 3, 2024

So far, this PR resolves a number of runtime and compile-time errors in HeatmapLayer and its dependencies. The layer still does not render, but also doesn't log errors that appear serious. Feels like a good state to share WIP here and discuss.

Dependencies:

@donmccurdy
Copy link
Collaborator Author

donmccurdy commented Jan 3, 2024

@donmccurdy

This comment was marked as outdated.

@donmccurdy donmccurdy requested a review from felixpalmer January 3, 2024 21:33
@donmccurdy
Copy link
Collaborator Author

@felixpalmer I requested a review here, but as you'll see I have a lot of TODOs and questions scattered through the code, it's not a working PR yet. I'm hoping it might be helpful to talk through some of this code tomorrow – I'll schedule some time if that's ok!

@donmccurdy donmccurdy force-pushed the donmccurdy/heatmap-layer-v9 branch from 1246eba to 48f1772 Compare January 4, 2024 18:01
@donmccurdy donmccurdy force-pushed the donmccurdy/min-transform-compile branch from f6953b4 to 7baee18 Compare January 4, 2024 18:36
Base automatically changed from donmccurdy/min-transform-compile to master January 9, 2024 16:39
@donmccurdy donmccurdy force-pushed the donmccurdy/heatmap-layer-v9 branch 3 times, most recently from 26fe264 to 20ea7ae Compare January 11, 2024 19:07
@donmccurdy donmccurdy added this to the v9.0 milestone Jan 11, 2024
Copy link
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I have done a first readthrough of this heatmap PR, there is a lot going on and hard to spot issues in a review. I’ll come back to it later, but initial comments

  • My instinct would be be to divide and conquer, i.e. break out the transforms into separate functions or even better into separate files and try to unit test them separately.
  • Your debug tools (buffer reads, framebuffer dumps etc) are good we should make sure they are available from luma.gl, though we could create a debug folder in deck.gl/core for now. And we should figure out how to make the luma spector support work out of the box.
  • Ideally we should clean up all the debug enabling code from this PR, there is a lot of commented out code etc.

@donmccurdy
Copy link
Collaborator Author

@ibgreen thanks for your review! In the current state of the PR, nothing is being drawn to framebuffers — so all code here is intended to flush out errors rather than to be mergeable code. That's also why I've hidden <View id="basemap">, as having a second WebGL canvas on the page makes Spector.js more tedious to use. Once there are "signs of life" from the heatmap I'll remove most of this code. My main concerns are whether uniforms and attributes are being constructed with the new APIs correctly — note that the TextureTransform and BufferTransform take a superset of ModelProps as input.


Some further updates, thanks to your recent debugger tooling additions! No action or response required on any of this, just sharing my debugging notes —

I've noticed that the heatmap-layer-weights-transform model (the first transform step) does not have vertex attribute values the first time it draws. The second model and transform step, heatmap-layer-max-weights-transform, prints nothing to the console. Screenshot:

heatmap_debug_1st

Stepping into the debugger, the missing lines for the second model are indeed empty objects, {}, which might indicate something to investigate here. The first step doesn't produce output though, so that could also be the cause.

The second time the gpu grid aggregator draws (e.g. on a zoom event), the heatmap-layer-weights-transform model does have vertex attribute values:

heatmap_debug_2nd

It still doesn't produce output, but this is probably helpful to know while debugging. It's also interesting that positions and positions64Low display the same array. Probably because they're interleaved?

@donmccurdy donmccurdy force-pushed the donmccurdy/heatmap-layer-v9 branch from 20ea7ae to 60173ad Compare January 18, 2024 17:46
sampler: {
minFilter: 'nearest',
magFilter: 'nearest',
minFilter: 'linear',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In v8, these are also LINEAR. This PR introduced the regression

@felixpalmer felixpalmer marked this pull request as ready for review February 1, 2024 13:22
@felixpalmer felixpalmer changed the title fix(HeatmapLayer): Update HeatmapLayer for v9 (WIP) HeatmapLayer for v9 Feb 1, 2024
@donmccurdy donmccurdy merged commit 2726f59 into master Feb 1, 2024
@donmccurdy
Copy link
Collaborator Author

Huge thanks to @felixpalmer for debugging and getting this rendering again!

@donmccurdy donmccurdy deleted the donmccurdy/heatmap-layer-v9 branch February 1, 2024 15:44
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

Successfully merging this pull request may close these issues.

4 participants