7

In HLSL I have two arrays:

int arr1[2]; 
int arr2[2];

I need to copy contents of arr1 to arr2.

Should I iterate through every element?

arr2[0] = arr1[0]; 
arr2[1] = arr1[1];

Is there any specific HLSL tool (like memcpy() in C/C++)?

Or could I just write arr2 = arr1; and that will work for me?

Oliort UA
  • 1,500
  • 13
  • 30

0 Answers0