Efficiently Generate a Heat Map Style Histogram using GLSL

北战南征 提交于 2019-12-11 03:49:17

问题


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?

来源:https://stackoverflow.com/questions/30857894/efficiently-generate-a-heat-map-style-histogram-using-glsl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!