struct-methods.hlsl 213 B

12345678910111213
  1. struct MyTestStruct
  2. {
  3. uint4 data[2];
  4. uint getData1() {
  5. return uint (data[1].z);
  6. }
  7. float3 getDataAsFloat() {
  8. return float3 (asfloat(data[0].x), asfloat(data[0].y), asfloat(data[0].z));
  9. }
  10. };