What is your resolution and fps? Maybe there is a smart way using hardware interpolation for that one. how about stretching your texture from 128x128 to 1x128 using linear interpolation, and then reading back these values?
scaling like that will only give me the middle pixel value.
I tried consecutive iterations of horizontal blur, but somehow it also affected the vertical dimension.
also I need resolutions up to, and maybe beyond 4K
using one pipet for each pixel is particularly slow. get a whole line at once and average that. the Stride pipet has an input for a list of pixel coordinates.
Depending on how you read it back, either the main loop gets blocked or you receive the result from a few frames earlier. Unfortunately, there are some obstacles in the way when transferring data from the GPU to the CPU.