Closed Floris0106 closed 2 years ago
Nevermind, I tried to implement this myself to make a pull request, but I discovered compiler error CS0564, which states: "The first operand of an overloaded shift operator must have the same type as the containing type, and the type of the second operand must be int". Thus, the proposed bitshift operator like in HLSL cannot exist in C# currently.
Currently, int and uint vector types support bitshifting, but only with int and uint scalar values. It would be nice to have bitshifts also work on vectors of the same size, like HLSL supports as well.