Trouble with 3D Cross Compute shader

Check CrossDebug.v4p
I’m probably missing something obvious, but can’t seem to get this to work. Should be a compute version of Cross (3d). I’ve attached a zip with the files, if anyone can say what’s wrong please do.

this is the indexing part of the code:

uint colI = dtid.x % xBcount;
	uint rowI = floor(dtid.x / xBcount) % xBcount;
	uint pageI = floor(dtid.x / (xBcount*yBcount)) % zBcount;

	Output[dtid.x](dtid.x) = float3( xB[colI](colI), yB[rowI](rowI), zB[pageI](pageI)) ;

it works for some spreadcounts, others get results like this:

Cross (3D Buffer).zip (15.5 kB)

Just remove floor in your compute shader, not needed as you are using ints )

Thanks!! I’d tried this already, but think might have a bugger from elsewhere as well that was confusing the situation. Anyway it’s readback always matches with the native node now.