logoalt Hacker News

huntergemmeryesterday at 5:59 PM1 replyview on HN

Great suggestion - density mapping is a really effective technique for overplotted data. Instead of drawing 1M points where most overlap, you're essentially rendering a heatmap of point concentration. WebGPU compute shaders would be perfect for this - bin the points into a grid, count per cell, then render intensity. Could even do it in a single pass. I've been thinking about this for scatter plots especially, where you might have clusters that just look like solid blobs at full zoom-out. A density mode would reveal the structure. Added to the ideas list - thanks for the suggestion!


Replies

akomtuyesterday at 6:33 PM

You don't need webgpu for that. It's a standard vertex shader -> fragment shader pass with the blending mode set to addition.

show 2 replies