Hy!
I have a compute shader:
[numthreads(128, 1, 1)]
void csAdvect(uint2 dtid : SV_DispatchThreadID)
{
uint4 dtl = uint4(dtid, 0, 0);
float2 inverseSize = float2(1.0f / gridSize.x, 1.0f / gridSize.y);
float2 coord = float2(dtid.x*inverseSize.x, dtid.y*inverseSize.y);
float statict = statictemp.Load(dtl).x;
if (statict < 0)statict = 0;
float t = temperature.SampleLevel(zeroBoundarySampler, coord, 0).x;
outputTemperature[dtid] = statict + t;
}
It's read from a static texture cell, sample an another and write it to an output texture. Bare sample. The textures and the gridSize are 512x512, I call this with Dispatch(4, 512, 1) and in every render step I swap the temperature and outputTemperature textures.
I thought it will do something like a circular grow from the static points, but instead its growing only right-down. The blackish/redish thing in the top left corner is the static 'heat', the less red thing is the temperature from the shader.
Any idea what am I doing wrong?