Is it possible to refer to the current pixel of a compute shader?
Every example I’ve seen that refers to individual pixels uses a declaration like
void MyComputeFunc(uint2 tid : SV_DispatchThreadID)
and then uses tid to calculate the current pixel, but this only works if you have more threads than you have pixels in your texture. What am I missing?
EDIT: Turns out I was wrong
If I use
[numthreads(1, 1, 1)]
in my compute shader and then use X by Y thread groups where x and y are my texture dimensions, everything works fine.