- Home /
How to share constant variables between Compute Shaders?
So, I have two compute shaders A and B. 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); ?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Persistent Data in Compute Shaders. 0 Answers
How to set GameObject inactive without messing up GPU instancing? 0 Answers
How to get Initial texture in Post-Processing Stack v2 1 Answer