internal static bool select_shuffle_component(bool3 a, bool3 b, ShuffleComponent component) { switch (component) { case ShuffleComponent.LeftX: return(a.x); case ShuffleComponent.LeftY: return(a.y); case ShuffleComponent.LeftZ: return(a.z); case ShuffleComponent.RightX: return(b.x); case ShuffleComponent.RightY: return(b.y); case ShuffleComponent.RightZ: return(b.z); default: throw new System.ArgumentException("Invalid shuffle component: " + component); } }
public static bool3 shuffle(bool2 left, bool2 right, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(bool3( select_shuffle_component(left, right, x), select_shuffle_component(left, right, y), select_shuffle_component(left, right, z))); }
public static fp3 shuffle(fp2 a, fp2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(fp3( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z))); }
public static double3 shuffle(double2 a, double2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(double3( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z))); }
public static float3 shuffle(float2 a, float2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(float3( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z))); }
private static float pickShuffleComponent(float4 a, float4 b, ShuffleComponent component) { switch (component) { case ShuffleComponent.LeftX: return(a.x); case ShuffleComponent.LeftY: return(a.y); case ShuffleComponent.LeftZ: return(a.z); case ShuffleComponent.LeftW: return(a.w); case ShuffleComponent.RightX: return(b.x); case ShuffleComponent.RightY: return(b.y); case ShuffleComponent.RightZ: return(b.z); case ShuffleComponent.RightW: return(b.w); default: throw new System.ArgumentException("Invalid shuffle component: " + (int)component); } }
public static uint3 shuffle(uint2 a, uint2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(uint3( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z))); }
public static bool3 shuffle(bool3 a, bool3 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z) { return(bool3( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z))); }
public static bool4 shuffle(bool2 a, bool2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { return(bool4( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z), select_shuffle_component(a, b, w))); }
public static float4 shuffle(float4 a, float4 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { // Naive implementation for non-burst return(float4(pickShuffleComponent(a, b, x), pickShuffleComponent(a, b, y), pickShuffleComponent(a, b, z), pickShuffleComponent(a, b, w))); }
public static uint4 shuffle(uint2 a, uint2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { return(uint4( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z), select_shuffle_component(a, b, w))); }
public static float4 shuffle(float2 a, float2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { return(float4( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z), select_shuffle_component(a, b, w))); }
public static double4 shuffle(double2 a, double2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { return(double4( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z), select_shuffle_component(a, b, w))); }
public static fix64p4 shuffle(fix64p2 a, fix64p2 b, ShuffleComponent x, ShuffleComponent y, ShuffleComponent z, ShuffleComponent w) { return(fix64p4( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y), select_shuffle_component(a, b, z), select_shuffle_component(a, b, w))); }
internal static sfloat select_shuffle_component(float2 a, float2 b, ShuffleComponent component) { switch (component) { case ShuffleComponent.LeftX: return(a.x); case ShuffleComponent.LeftY: return(a.y); case ShuffleComponent.RightX: return(b.x); case ShuffleComponent.RightY: return(b.y); default: throw new System.ArgumentException("Invalid shuffle component: " + component); } }
public static uint2 shuffle(uint2 a, uint2 b, ShuffleComponent x, ShuffleComponent y) { return(uint2( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y))); }
public static uint shuffle(uint2 a, uint2 b, ShuffleComponent x) { return(select_shuffle_component(a, b, x)); }
public static fp shuffle(fp2 a, fp2 b, ShuffleComponent x) { return(select_shuffle_component(a, b, x)); }
public static float2 shuffle(float2 a, float2 b, ShuffleComponent x, ShuffleComponent y) { return(float2( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y))); }
public static sfloat shuffle(float2 a, float2 b, ShuffleComponent x) { return(select_shuffle_component(a, b, x)); }
public static bool shuffle(bool2 left, bool2 right, ShuffleComponent x) { return(select_shuffle_component(left, right, x)); }
public static double2 shuffle(double2 a, double2 b, ShuffleComponent x, ShuffleComponent y) { return(double2( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y))); }
public static bool shuffle(bool3 a, bool3 b, ShuffleComponent x) { return(select_shuffle_component(a, b, x)); }
public static bool2 shuffle(bool3 a, bool3 b, ShuffleComponent x, ShuffleComponent y) { return(bool2( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y))); }
public static double shuffle(double2 a, double2 b, ShuffleComponent x) { return(select_shuffle_component(a, b, x)); }
public static fix64p2 shuffle(fix64p2 a, fix64p2 b, ShuffleComponent x, ShuffleComponent y) { return(fix64p2( select_shuffle_component(a, b, x), select_shuffle_component(a, b, y))); }