namespace ComputeSharp; /// /// A that maps the HLSL type. /// public partial struct UInt4 { /// /// Gets an value with all components set to 0. /// public static UInt4 Zero => 0; /// /// Gets an value with all components set to 1. /// public static UInt4 One => 1; /// /// Gets an value with the component set to 1, and the others to 0. /// public static UInt4 UnitX => new(1, 0, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0. /// public static UInt4 UnitY => new(0, 1, 0, 0); /// /// Gets an value with the component set to 1, and the others to 0. /// public static UInt4 UnitZ => new(0, 0, 1, 0); /// /// Gets an value with the component set to 1, and the others to 0. /// public static UInt4 UnitW => new(0, 0, 0, 1); /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first vector component. /// The value to assign to the second vector component. /// The value to assign to the third vector component. /// The value to assign to the fourth vector component. public UInt4(uint x, uint y, uint z, uint w) { this.x = x; this.y = y; this.z = z; this.w = w; } /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first and second vector components. /// The value to assign to the third vector component. /// The value to assign to the fourth vector component. public UInt4(UInt2 xy, uint z, uint w) { this.x = xy.X; this.y = xy.Y; this.z = z; this.w = w; } /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first vector component. /// The value to assign to the second vector component. /// The value to assign to the third and fourth vector components. public UInt4(uint x, uint y, UInt2 zw) { this.x = x; this.y = y; this.z = zw.X; this.w = zw.Y; } /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first and second vector components. /// The value to assign to the third and fourth vector components. public UInt4(UInt2 xy, UInt2 zw) { this.x = xy.X; this.y = xy.Y; this.z = zw.X; this.w = zw.Y; } /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first, second and third vector components. /// The value to assign to the fourth vector component. public UInt4(UInt3 xyz, uint w) { this.x = xyz.X; this.y = xyz.Y; this.z = xyz.Z; this.w = w; } /// /// Creates a new instance with the specified parameters. /// /// The value to assign to the first vector component. /// The value to assign to the second, third and fourth vector components. public UInt4(uint x, UInt3 yzw) { this.x = x; this.y = yzw.X; this.z = yzw.Y; this.w = yzw.Z; } /// /// Creates a new value with the same value for all its components. /// /// The value to use for the components of the new instance. public static implicit operator UInt4(uint x) => new(x, x, x, x); /// /// Casts a value to a one. /// /// The input value to cast. /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static explicit operator Int4(UInt4 xyzw) => default; /// /// Casts a value to a one. /// /// The input value to cast. /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static implicit operator Float4(UInt4 xyzw) => default; /// /// Casts a value to a one. /// /// The input value to cast. /// This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior. public static implicit operator Double4(UInt4 xyzw) => default; }