Original Post
Hello,
a while back I used the compute shader to perform blur in 2 passes (horizontal & vertical).
I used shared memory to load many pixels at once.
The obvious way was to load a long "line" of pixels at once - lets say a horizontal line of 128 pixels.
I then tried changing the pattern: I loaded a block of 32x4 pixels in the group shared memory.
This second version performed a lot faster than loading one big line.
Then not recently I read a GDC paper that says it is indeed better to load blocks of pixels instead of long lines.
How does texture caching works? Does it load in surrounding pixels from the ones you are trying to sample instead of just loading in the
cache the data that is positioned around the current pixel in memory (like a buffer)?
a while back I used the compute shader to perform blur in 2 passes (horizontal & vertical).
I used shared memory to load many pixels at once.
The obvious way was to load a long "line" of pixels at once - lets say a horizontal line of 128 pixels.
I then tried changing the pattern: I loaded a block of 32x4 pixels in the group shared memory.
This second version performed a lot faster than loading one big line.
Then not recently I read a GDC paper that says it is indeed better to load blocks of pixels instead of long lines.
How does texture caching works? Does it load in surrounding pixels from the ones you are trying to sample instead of just loading in the
cache the data that is positioned around the current pixel in memory (like a buffer)?