Efficiently Generate a Heat Map Style Histogram using GLSL

1.2k views Asked by At

I would like to generate a heat map style histogram using GLSL shaders. Specifically, I have a vector of 2D values that I want to bin into a 2D grid, where each cell is a bin for a specific range of (x,y) values, and it's color is determined by how many values are binned into it.

I can easily assign values to cells in the vertex shader, or compute shader. How can I also write to a 2D buffer the frequencies in each bin/cell and then assign color and render to texture accordingly?

0

There are 0 answers