So, I have two compute shaders A and B (using unity and HLSL). Right now, before every dispatch, I send my mouse coordinates to both of them every update.
So, from my understanding, you can actually determine which register the mouse coordinates go to like so:
float2 mxy :register(c1); // at the top of the shader
And by declaring this in both shaders, you can actually avoid sending the mouse coordinates twice.
The problem is, that this does not work! I've tried making cbuffers as well, but to no avail. (I don't actually know how to work with cbuffers on the CPU side that said)
TLDR: why can't I share variables between two compute shaders using float2 mxy :register(c1); ?