Add scalar promotion multiplication operators for Float/Int types
This avoids overload resolution conflicts with the mul() operators
このコミットが含まれているのは:
1 親
1daf6338df
コミット
488f1912fc
10ファイル変更
+765
-30
検索条件に一致するファイルはありません
@@ -499,6 +499,24 @@ public unsafe partial struct Float2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2 operator *(Float2 left, Float2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float2"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2 operator *(Float2 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2 operator *(float left, Float2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -1585,6 +1585,24 @@ public unsafe partial struct Float3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3 operator *(Float3 left, Float3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float3"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3 operator *(Float3 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3 operator *(float left, Float3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -4231,6 +4231,24 @@ public unsafe partial struct Float4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4 operator *(Float4 left, Float4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float4"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4 operator *(Float4 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4 operator *(float left, Float4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -126,6 +126,24 @@ public unsafe partial struct Float1x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x1 operator *(Float1x1 left, Float1x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float1x1"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float1x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x1 operator *(Float1x1 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float1x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float1x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x1 operator *(float left, Float1x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Float1x1"/> values.
|
||||
/// </summary>
|
||||
@@ -317,6 +335,24 @@ public unsafe partial struct Float1x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x2 operator *(Float1x2 left, Float1x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float1x2"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float1x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x2 operator *(Float1x2 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float1x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float1x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x2 operator *(float left, Float1x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -609,6 +645,24 @@ public unsafe partial struct Float1x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x3 operator *(Float1x3 left, Float1x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float1x3"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float1x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x3 operator *(Float1x3 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float1x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float1x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x3 operator *(float left, Float1x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -912,6 +966,24 @@ public unsafe partial struct Float1x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x4 operator *(Float1x4 left, Float1x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float1x4"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float1x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x4 operator *(Float1x4 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float1x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float1x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float1x4 operator *(float left, Float1x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -1193,6 +1265,24 @@ public unsafe partial struct Float2x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x1 operator *(Float2x1 left, Float2x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float2x1"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float2x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x1 operator *(Float2x1 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float2x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float2x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x1 operator *(float left, Float2x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -1495,6 +1585,24 @@ public unsafe partial struct Float2x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x2 operator *(Float2x2 left, Float2x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float2x2"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float2x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x2 operator *(Float2x2 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float2x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float2x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x2 operator *(float left, Float2x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Float2x2"/> values.
|
||||
/// </summary>
|
||||
@@ -1745,6 +1853,24 @@ public unsafe partial struct Float2x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x3 operator *(Float2x3 left, Float2x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float2x3"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float2x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x3 operator *(Float2x3 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float2x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float2x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x3 operator *(float left, Float2x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -2103,6 +2229,24 @@ public unsafe partial struct Float2x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x4 operator *(Float2x4 left, Float2x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float2x4"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float2x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x4 operator *(Float2x4 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float2x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float2x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float2x4 operator *(float left, Float2x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -2389,6 +2533,24 @@ public unsafe partial struct Float3x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x1 operator *(Float3x1 left, Float3x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float3x1"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float3x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x1 operator *(Float3x1 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float3x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float3x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x1 operator *(float left, Float3x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -2716,6 +2878,24 @@ public unsafe partial struct Float3x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x2 operator *(Float3x2 left, Float3x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float3x2"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float3x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x2 operator *(Float3x2 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float3x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float3x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x2 operator *(float left, Float3x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -3087,6 +3267,24 @@ public unsafe partial struct Float3x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x3 operator *(Float3x3 left, Float3x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float3x3"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float3x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x3 operator *(Float3x3 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float3x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float3x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x3 operator *(float left, Float3x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Float3x3"/> values.
|
||||
/// </summary>
|
||||
@@ -3410,6 +3608,24 @@ public unsafe partial struct Float3x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x4 operator *(Float3x4 left, Float3x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float3x4"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float3x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x4 operator *(Float3x4 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float3x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float3x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float3x4 operator *(float left, Float3x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -3707,6 +3923,24 @@ public unsafe partial struct Float4x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x1 operator *(Float4x1 left, Float4x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float4x1"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float4x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x1 operator *(Float4x1 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float4x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float4x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x1 operator *(float left, Float4x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -4059,6 +4293,24 @@ public unsafe partial struct Float4x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x2 operator *(Float4x2 left, Float4x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float4x2"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float4x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x2 operator *(Float4x2 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float4x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float4x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x2 operator *(float left, Float4x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -4467,6 +4719,24 @@ public unsafe partial struct Float4x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x3 operator *(Float4x3 left, Float4x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float4x3"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float4x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x3 operator *(Float4x3 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float4x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float4x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x3 operator *(float left, Float4x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -4923,6 +5193,24 @@ public unsafe partial struct Float4x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x4 operator *(Float4x4 left, Float4x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Float4x4"/> and <see cref="float"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Float4x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="float"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x4 operator *(Float4x4 left, float right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="float"/> and <see cref="Float4x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="float"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Float4x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Float4x4 operator *(float left, Float4x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Float4x4"/> values.
|
||||
/// </summary>
|
||||
|
||||
@@ -499,6 +499,24 @@ public unsafe partial struct Int2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2 operator *(Int2 left, Int2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int2"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2 operator *(Int2 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2 operator *(int left, Int2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -1585,6 +1585,24 @@ public unsafe partial struct Int3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator *(Int3 left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int3"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator *(Int3 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3 operator *(int left, Int3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -4231,6 +4231,24 @@ public unsafe partial struct Int4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4 operator *(Int4 left, Int4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int4"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4 operator *(Int4 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4 operator *(int left, Int4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
|
||||
@@ -126,6 +126,24 @@ public unsafe partial struct Int1x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x1 operator *(Int1x1 left, Int1x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int1x1"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int1x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x1 operator *(Int1x1 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int1x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int1x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x1 operator *(int left, Int1x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Int1x1"/> values.
|
||||
/// </summary>
|
||||
@@ -417,6 +435,24 @@ public unsafe partial struct Int1x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x2 operator *(Int1x2 left, Int1x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int1x2"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int1x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x2 operator *(Int1x2 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int1x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int1x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x2 operator *(int left, Int1x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -809,6 +845,24 @@ public unsafe partial struct Int1x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x3 operator *(Int1x3 left, Int1x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int1x3"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int1x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x3 operator *(Int1x3 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int1x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int1x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x3 operator *(int left, Int1x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -1212,6 +1266,24 @@ public unsafe partial struct Int1x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x4 operator *(Int1x4 left, Int1x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int1x4"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int1x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x4 operator *(Int1x4 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int1x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int1x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int1x4 operator *(int left, Int1x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -1593,6 +1665,24 @@ public unsafe partial struct Int2x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x1 operator *(Int2x1 left, Int2x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int2x1"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x1 operator *(Int2x1 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int2x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int2x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x1 operator *(int left, Int2x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -1995,6 +2085,24 @@ public unsafe partial struct Int2x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x2 operator *(Int2x2 left, Int2x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int2x2"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x2 operator *(Int2x2 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int2x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int2x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x2 operator *(int left, Int2x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Int2x2"/> values.
|
||||
/// </summary>
|
||||
@@ -2345,6 +2453,24 @@ public unsafe partial struct Int2x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x3 operator *(Int2x3 left, Int2x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int2x3"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x3 operator *(Int2x3 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int2x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int2x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x3 operator *(int left, Int2x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -2803,6 +2929,24 @@ public unsafe partial struct Int2x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x4 operator *(Int2x4 left, Int2x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int2x4"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int2x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x4 operator *(Int2x4 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int2x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int2x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int2x4 operator *(int left, Int2x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -3189,6 +3333,24 @@ public unsafe partial struct Int3x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x1 operator *(Int3x1 left, Int3x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int3x1"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x1 operator *(Int3x1 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int3x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int3x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x1 operator *(int left, Int3x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -3616,6 +3778,24 @@ public unsafe partial struct Int3x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x2 operator *(Int3x2 left, Int3x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int3x2"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x2 operator *(Int3x2 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int3x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int3x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x2 operator *(int left, Int3x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -4087,6 +4267,24 @@ public unsafe partial struct Int3x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x3 operator *(Int3x3 left, Int3x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int3x3"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x3 operator *(Int3x3 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int3x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int3x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x3 operator *(int left, Int3x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Int3x3"/> values.
|
||||
/// </summary>
|
||||
@@ -4510,6 +4708,24 @@ public unsafe partial struct Int3x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x4 operator *(Int3x4 left, Int3x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int3x4"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int3x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x4 operator *(Int3x4 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int3x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int3x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int3x4 operator *(int left, Int3x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -4907,6 +5123,24 @@ public unsafe partial struct Int4x1
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x1 operator *(Int4x1 left, Int4x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int4x1"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4x1"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x1 operator *(Int4x1 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int4x1"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int4x1"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x1 operator *(int left, Int4x1 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -5359,6 +5593,24 @@ public unsafe partial struct Int4x2
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x2 operator *(Int4x2 left, Int4x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int4x2"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4x2"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x2 operator *(Int4x2 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int4x2"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int4x2"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x2 operator *(int left, Int4x2 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -5867,6 +6119,24 @@ public unsafe partial struct Int4x3
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x3 operator *(Int4x3 left, Int4x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int4x3"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4x3"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x3 operator *(Int4x3 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int4x3"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int4x3"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x3 operator *(int left, Int4x3 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
/// </summary>
|
||||
@@ -6423,6 +6693,24 @@ public unsafe partial struct Int4x4
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x4 operator *(Int4x4 left, Int4x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="Int4x4"/> and <see cref="int"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="Int4x4"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="int"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x4 operator *(Int4x4 left, int right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="int"/> and <see cref="Int4x4"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="int"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="Int4x4"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static Int4x4 operator *(int left, Int4x4 right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Subtracts two <see cref="Int4x4"/> values.
|
||||
/// </summary>
|
||||
|
||||
@@ -297,15 +297,39 @@ public unsafe partial struct <#=fullTypeName#>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=fullTypeName#> operator *(<#=fullTypeName#> left, <#=fullTypeName#> right) => default;
|
||||
<#
|
||||
// Process all operators for the mul() intrinsic (see comments in VectorType.ttinclude for info on the filters below)
|
||||
foreach (var mulOverload in MulOverloads.Where(overload =>
|
||||
!(overload.Params[0] == fullTypeName && overload.Params[1] == fullTypeName) &&
|
||||
Regex.IsMatch(overload.Params[0], @"\d") &&
|
||||
Regex.IsMatch(overload.Params[1], @"\d") &&
|
||||
(overload.Return == fullTypeName && overload.Params.Contains(fullTypeName) ||
|
||||
!overload.Params.Contains(overload.Return) && overload.Params[0] == fullTypeName)))
|
||||
if (typeName == "Float" || typeName == "Int")
|
||||
{
|
||||
// Add explicit operators when needed, see notes in VectorType.ttinclude for info
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="<#=fullTypeName#>"/> and <see cref="<#=elementTypeName#>"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=fullTypeName#>"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="<#=elementTypeName#>"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=fullTypeName#> operator *(<#=fullTypeName#> left, <#=elementTypeName#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="<#=elementTypeName#>"/> and <see cref="<#=fullTypeName#>"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=elementTypeName#>"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="<#=fullTypeName#>"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=fullTypeName#> operator *(<#=elementTypeName#> left, <#=fullTypeName#> right) => default;
|
||||
<#
|
||||
|
||||
// Process all operators for the mul() intrinsic (see comments in VectorType.ttinclude for info on the filters below)
|
||||
foreach (var mulOverload in MulOverloads.Where(overload =>
|
||||
!(overload.Params[0] == fullTypeName && overload.Params[1] == fullTypeName) &&
|
||||
Regex.IsMatch(overload.Params[0], @"\d") &&
|
||||
Regex.IsMatch(overload.Params[1], @"\d") &&
|
||||
(overload.Return == fullTypeName && overload.Params.Contains(fullTypeName) ||
|
||||
!overload.Params.Contains(overload.Return) && overload.Params[0] == fullTypeName)))
|
||||
{
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
@@ -321,6 +345,7 @@ public unsafe partial struct <#=fullTypeName#>
|
||||
[HlslIntrinsicName("mul", RequiresParametersMatching = true)]
|
||||
public static <#=mulOverload.Return#> operator *(<#=mulOverload.Params[0]#> x, <#=mulOverload.Params[1]#> y) => default;
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
WriteLine("");
|
||||
|
||||
@@ -360,31 +360,56 @@ public unsafe partial struct <#=typeName#>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=typeName#> operator *(<#=typeName#> left, <#=typeName#> right) => default;
|
||||
<#
|
||||
// Process all operators for the mul() intrinsic. We apply the following filtering:
|
||||
// 1) Operators where both arguments are of the containing type are skipped. This is because
|
||||
// this operation is already defined as an elementwise product for all vector/matrix types.
|
||||
// Defining the operator would cause a conflict, plus it would alter the semantics anyway.
|
||||
// 2) Operators where either parameter is a primitive type (ie. not a vector) are skipped. This
|
||||
// is because such operation is already implicitly defined (it's an elementwise product where
|
||||
// the scalar is auto-promoted to the same vector/matrix type of the other argument). Again,
|
||||
// defining the operator would cause the semantics of such expressions to change to a cross
|
||||
// product, so these operators are intentionally skipped to keep code consistent with HLSL.
|
||||
// 3) Among all available overloads, only either of these two cases are selected:
|
||||
// - The containing type matches the return type and the first parameter type of the operator.
|
||||
// This ensures that all overloads where the return type matches the containing type and the
|
||||
// first parameter are generated inside the containing type, as one would do manually as well.
|
||||
// - The return type is unlike both parameter types, but the containing type matches the type of
|
||||
// the first parameter. This is the case when the operator (ie. the cross product) produces a
|
||||
// result that's of a completely different type. In this case, the overload maps to a generated
|
||||
// operator declared in the type that matches the type of the first parameter, as a convention.
|
||||
foreach (var mulOverload in MulOverloads.Where(overload =>
|
||||
!(overload.Params[0] == typeName && overload.Params[1] == typeName) &&
|
||||
Regex.IsMatch(overload.Params[0], @"\d") &&
|
||||
Regex.IsMatch(overload.Params[1], @"\d") &&
|
||||
(overload.Return == typeName && overload.Params.Contains(typeName) ||
|
||||
!overload.Params.Contains(overload.Return) && overload.Params[0] == typeName)))
|
||||
if (elementTypeName == "Float" || elementTypeName == "Int")
|
||||
{
|
||||
// Note: for Float and Int vector types, we need to also add explicit operators doing scalar promotion,
|
||||
// otherwise there would be an overload issue trying to resolve the right overload when just multiplying
|
||||
// by a scalar (which is not using the mul() intrinsic, but just doing elementwise product with promotion).
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="<#=typeName#>"/> and <see cref="<#=hlslElementTypeName#>"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=typeName#>"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="<#=hlslElementTypeName#>"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=typeName#> operator *(<#=typeName#> left, <#=hlslElementTypeName#> right) => default;
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a pair of <see cref="<#=hlslElementTypeName#>"/> and <see cref="<#=typeName#>"/> values.
|
||||
/// </summary>
|
||||
/// <param name="left">The <see cref="<#=hlslElementTypeName#>"/> value to multiply.</param>
|
||||
/// <param name="right">The <see cref="<#=typeName#>"/> value to multiply.</param>
|
||||
/// <returns>The result of multiplying <paramref name="left"/> and <paramref name="right"/>.</returns>
|
||||
/// <remarks>This method is an intrinsic and can only be used within a shader on the GPU. Using it on the CPU is undefined behavior.</remarks>
|
||||
public static <#=typeName#> operator *(<#=hlslElementTypeName#> left, <#=typeName#> right) => default;
|
||||
<#
|
||||
// Process all operators for the mul() intrinsic. We apply the following filtering:
|
||||
// 1) Operators where both arguments are of the containing type are skipped. This is because
|
||||
// this operation is already defined as an elementwise product for all vector/matrix types.
|
||||
// Defining the operator would cause a conflict, plus it would alter the semantics anyway.
|
||||
// 2) Operators where either parameter is a primitive type (ie. not a vector) are skipped. This
|
||||
// is because such operation is already implicitly defined (it's an elementwise product where
|
||||
// the scalar is auto-promoted to the same vector/matrix type of the other argument). Again,
|
||||
// defining the operator would cause the semantics of such expressions to change to a cross
|
||||
// product, so these operators are intentionally skipped to keep code consistent with HLSL.
|
||||
// 3) Among all available overloads, only either of these two cases are selected:
|
||||
// - The containing type matches the return type and the first parameter type of the operator.
|
||||
// This ensures that all overloads where the return type matches the containing type and the
|
||||
// first parameter are generated inside the containing type, as one would do manually as well.
|
||||
// - The return type is unlike both parameter types, but the containing type matches the type of
|
||||
// the first parameter. This is the case when the operator (ie. the cross product) produces a
|
||||
// result that's of a completely different type. In this case, the overload maps to a generated
|
||||
// operator declared in the type that matches the type of the first parameter, as a convention.
|
||||
foreach (var mulOverload in MulOverloads.Where(overload =>
|
||||
!(overload.Params[0] == typeName && overload.Params[1] == typeName) &&
|
||||
Regex.IsMatch(overload.Params[0], @"\d") &&
|
||||
Regex.IsMatch(overload.Params[1], @"\d") &&
|
||||
(overload.Return == typeName && overload.Params.Contains(typeName) ||
|
||||
!overload.Params.Contains(overload.Return) && overload.Params[0] == typeName)))
|
||||
{
|
||||
WriteLine("");
|
||||
#>
|
||||
/// <summary>
|
||||
/// Multiplies two values using matrix math.
|
||||
@@ -400,6 +425,7 @@ public unsafe partial struct <#=typeName#>
|
||||
[HlslIntrinsicName("mul", RequiresParametersMatching = true)]
|
||||
public static <#=mulOverload.Return#> operator *(<#=mulOverload.Params[0]#> x, <#=mulOverload.Params[1]#> y) => default;
|
||||
<#
|
||||
}
|
||||
}
|
||||
|
||||
WriteLine("");
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする