2023-03-31 17:55:19 +00:00
|
|
|
RWByteAddressBuffer ssbo : register(u0);
|
2021-07-27 08:17:29 +00:00
|
|
|
|
2023-02-24 17:16:55 +00:00
|
|
|
float2x2 ssbo_load(uint offset) {
|
|
|
|
return float2x2(asfloat(ssbo.Load2((offset + 0u))), asfloat(ssbo.Load2((offset + 8u))));
|
2021-07-27 08:17:29 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 17:16:55 +00:00
|
|
|
void ssbo_store(uint offset, float2x2 value) {
|
|
|
|
ssbo.Store2((offset + 0u), asuint(value[0u]));
|
|
|
|
ssbo.Store2((offset + 8u), asuint(value[1u]));
|
2021-07-27 08:17:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
[numthreads(1, 1, 1)]
|
|
|
|
void f() {
|
2023-02-24 17:16:55 +00:00
|
|
|
const float2x2 v = ssbo_load(0u);
|
|
|
|
ssbo_store(0u, v);
|
2021-07-27 08:17:29 +00:00
|
|
|
return;
|
|
|
|
}
|