logoalt Hacker News

akomtuyesterday at 6:33 PM2 repliesview on HN

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


Replies

MindSpunkyesterday at 7:31 PM

Drawing lots of single pixels with alpha blending is probably one of the least efficient ways to use the rasterizer though. A good compute shader implementation would be substantially faster.

show 1 reply
vanderZwanyesterday at 7:28 PM

That works if more overdraw = more intensity is all you care about, and may very well be good enough for many kinds of charts. But with heat map plots one usually wants a proper mapping of some intensity domain to a color map and a legend with a color gradient that tells you which color represents which value. Which requires binning, counting per bin, and determining the min and max values.

show 1 reply