Good afternoon.
I am trying to understand how the kernel of convolutionTexture work.
I would like to know why 0,5f is added to the thread index:
const float x = (float)ix + 0.5f;
const float y = (float)iy + 0.5f;
thank you
Good afternoon.
I am trying to understand how the kernel of convolutionTexture work.
I would like to know why 0,5f is added to the thread index:
const float x = (float)ix + 0.5f;
const float y = (float)iy + 0.5f;
thank you
Hi,
I think it’s done to read from “the middle” of the pixels. You get more accurate results overall like that, I think, because it’s probably interpolating over the neighboring pixels, so you want to adjust the “empirical” thread numbers to their geometric usage.
Thank you for the answer.