Monday, 29 June 2015

The Windows 8 SDK version of DirectX Compute shaders in hlsl seems to be broken:

void ComputeShader(uint3 sub_pos: SV_DispatchThreadID)

results in sub_pos=(0,0,0) every time.

Therefore, replace the input with:

void ComputeShader(uint3 g:SV_GroupID,uint3 t:SV_GroupThreadID)

and then:

uint3 sub_pos = g * BLOCK_SIZE + t;