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
heatmap layer shows only one color from colorRange #3554
Comments
Can you share result image? Which of the colors in colorRange are used? Also try adjusting |
using default colorRange, it shows only yellow color. that means it shows only first color. |
Based on your image it seems all the pixels are falling into lower end of heat map range. Locally I am not able to reproduce this problem, can you share your system details? Browser, GPU, OS (complete the environment section in description) ? Also can you minimize the issue to few data samples and share that data here? |
I am seeing this same issue with deck.gl v7.2.3 in Windows. It happens in both Chrome and Edge. It works as expected in Chrome on linux. |
Browser : Chrome Version 76.0.3809.132 |
This bug occurs on Windows when hardware acceleration is enabled regardless of graphics chipsets. I tested both Nvidia and Intel graphics in Chrome and Edge 18 (non-chromium Edge). To prove the issue, go to chrome://settings/system and disable the option titled "Use hardware acceleration when available" and the heatmap will behave normally. Issue still present as of deck.gl@7.2.6 and deck.gl@7.3.0-beta.4. I do not know if this is a Chrome bug or a deck.gl bug, but it is definitely a bug. |
To reproduce this bug, just look at the heatmap demo in the documentation on a Windows machine with hardware acceleration enabled. |
@UttamRahane @SterlingMcCall can you load up this page on your systems and let us know the results: https://tsherif.github.io/webgl2-render-target-test/ |
The document page on chrome browser looks like:
|
@UttamRahane @tsherif I misspoke about Edge. As would be expected, Edge does not work at all due to lack of WebGL2 support. I tried firefox on windows and observe the same issue with the same color everywhere, but disabling hardware acceleration in the firefox settings did not fix the issue like it did in Chrome. @tsherif
|
On the same windows 10 machine with Intel HD graphics on Edge 18 with deck.gl@7.3.0-beta.4 the heatmap displays this same visual issue seen on Chrome and Firefox. |
@SterlingMcCall , to summarize, when using |
Correct. That would be an mostly accurate summary. I would add the following:
Could it be a Windows bug? |
@SterlingMcCall , thanks for the details. We are also seeing a crash in iOS due to unsupported WebGL feature (render to float textures), I am working on a fix to fallback to unsigned byte textures (with low precession), given what you are seeing is not a crash but rendering artifact, that could be a different issue specific to windows browsers. I will take a look.
disabling |
@1chandu The bug indeed appears to be in ANGLE. The easiest way I found to test is in Firefox, go to about:config and set If we narrow down the issue, we can report a bug here: https://bugs.chromium.org/p/angleproject/issues/list |
@tsherif , awesome !! I will dig more into this .. |
@SterlingMcCall @UttamRahane
Thanks. |
Switching to demo 1 console output:
demo 2: It would seem that your custom heatmap layer fixes/bypasses the issue. Awesome work! |
@SterlingMcCall , thanks for the details, this isolates the issue domain calculation, digging into it ... |
Problem root caused to ANGLE not supporting rendering to 1X1 textures, workaround (specification of custom domain) will be part of 7.3 release (ETA 09/27). |
@1chandu Awesome! Has a related ticket been opened on the ANGLE repo? |
Yes, link : https://bugs.chromium.org/p/angleproject/issues/detail?id=3941 |
@SterlingMcCall @UttamRahane , please try deck.gl '7.3.0-beta.9 ', and when using windows, set colorDomain props to [0, maxValue], where |
@1chandu Because it was available, I used the 7.3.0 release not the beta. Specifying the colorDomain does fix the issue, however it is not practical for dynamic datasets. In my use case, the maximum density of the data is not known so I am not able to choose an upper domain that works 100% of the time. From my very basic understanding of the algorithm, you recursively decrease the size of a texture until you end up with a 1x1 texture meeting some criteria, correct? Would it be possible to simply add a parameter to instead stop the algorithm at a 2x2 texture in the mean time? Regardless, this effort and current work around is much appreciated. |
I am not rendering to decreasing sizes, instead directly render to 1X1. I am hoping the ANGLE issue is resolved soon, and this shouldn't be a problem. |
While I agree that would be the optimal solution, over half of Edge users are on a versions of Windows over a year old, and since Edge versions are tied to the Windows build, it could be a year or two after the ANGLE bug is fixed before a majority of Edge users will be able to take advantage of the dynamic domain calculation. Is there any way to implement a workaround? Or is this bug too inherent to the domain calculation to do it differently? |
Stay tuned, will update here soon... |
@SterlingMcCall , added workaround for ANGLE issue in deck.gl 7.3.2, please give it a try, you don't have to set |
@1chandu The workaround appears to be working correctly. Thank you! |
Thanks for confirming, closing !! |
Description
Repro Steps
const heatMap_layer = new HeatmapLayer({
data: this.geoJson.features,
id: 'heatmp-layer',
opacity: 0.6,
getPosition: d => d.geometry.coordinates,
getWeight: d => d.properties['Max Capacity'],
colorFormat: 'RGBA',
colorRange: [[1, 152, 189, 255], [73, 227, 206, 255], [216, 254, 181, 255], [254, 237, 177, 255],[254, 173, 84, 255],[209, 55, 78, 255]],
intensity: 1,
radiusPixels: 80,
threshold: 0.9
});
-->
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: