Useful vector extensions#
These extension methods allow for Unity Vector3 and Vector2 structs to swamp channels similarly to HLSL. So a vector.xyz
could be easily mapped to vector.zyx
or vector.yyy
without long and repetitive syntax.
ferrouslights/VectorExtensions
A set of Vector2, Vector3, and Vector4 extensions for added channel swapping between xyzw/rgba similar to HLSL float2, float3, and float4’s.
C#
0
0