Change ComputeSharp sample APIs to Sample method
このコミットが含まれているのは:
1 親
9ede4fa012
コミット
789827aeca
10ファイル変更
+28
-28
検索条件に一致するファイルはありません
+4
-4
@@ -34,17 +34,17 @@ public interface IReadOnlyNormalizedTexture2D<TPixel> : IGraphicsResource
|
||||
ref readonly TPixel this[Int2 xy] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="u">The horizontal normalized offset of the value to get.</param>
|
||||
/// <param name="v">The vertical normalized offset of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly TPixel this[float u, float v] { get; }
|
||||
ref readonly TPixel Sample(float u, float v);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="uv">The normalized coordinates of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly TPixel this[Float2 uv] { get; }
|
||||
ref readonly TPixel Sample(Float2 uv);
|
||||
}
|
||||
+4
-4
@@ -40,18 +40,18 @@ public interface IReadOnlyNormalizedTexture3D<TPixel> : IGraphicsResource
|
||||
ref readonly TPixel this[Int3 xyz] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="u">The horizontal normalized offset of the value to get.</param>
|
||||
/// <param name="v">The vertical normalized offset of the value to get.</param>
|
||||
/// <param name="w">The depthwise normalized offset of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly TPixel this[float u, float v, float w] { get; }
|
||||
ref readonly TPixel Sample(float u, float v, float w);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="TPixel"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="uvw">The normalized coordinates of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly TPixel this[Float3 uvw] { get; }
|
||||
ref readonly TPixel Sample(Float3 uvw);
|
||||
}
|
||||
@@ -34,17 +34,17 @@ public interface IReadOnlyTexture2D<T> : IGraphicsResource
|
||||
ref readonly T this[Int2 xy] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="u">The horizontal normalized offset of the value to get.</param>
|
||||
/// <param name="v">The vertical normalized offset of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly T this[float u, float v] { get; }
|
||||
ref readonly T Sample(float u, float v);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="uv">The normalized coordinates of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly T this[Float2 uv] { get; }
|
||||
ref readonly T Sample(Float2 uv);
|
||||
}
|
||||
@@ -40,18 +40,18 @@ public interface IReadOnlyTexture3D<T> : IGraphicsResource
|
||||
ref readonly T this[Int3 xyz] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="u">The horizontal normalized offset of the value to get.</param>
|
||||
/// <param name="v">The vertical normalized offset of the value to get.</param>
|
||||
/// <param name="w">The depthwise normalized offset of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly T this[float u, float v, float w] { get; }
|
||||
ref readonly T Sample(float u, float v, float w);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// Retrieves a single <typeparamref name="T"/> value from the current readonly texture with linear sampling.
|
||||
/// </summary>
|
||||
/// <param name="uvw">The normalized coordinates of the value to get.</param>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly T this[Float3 uvw] { get; }
|
||||
ref readonly T Sample(Float3 uvw);
|
||||
}
|
||||
@@ -37,10 +37,10 @@ public sealed class ReadOnlyTexture2D<T, TPixel> : Texture2D<T>, IReadOnlyNormal
|
||||
public ref readonly TPixel this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture2D<T,TPixel>)}[{typeof(Int2)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[float u, float v] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture2D<T, TPixel>)}[{typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly TPixel Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture2D<T, TPixel>)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[Float2 uv] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture2D<T, TPixel>)}[{typeof(Float2)}]");
|
||||
public ref readonly TPixel Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture2D<T, TPixel>)}.{nameof(Sample)}({typeof(Float2)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string ToString()
|
||||
|
||||
@@ -38,10 +38,10 @@ public sealed class ReadOnlyTexture3D<T, TPixel> : Texture3D<T>, IReadOnlyNormal
|
||||
public ref readonly TPixel this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture3D<T, TPixel>)}[{typeof(Int3)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[float u, float v, float w] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture3D<T, TPixel>)}[{typeof(float)}, {typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly TPixel Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture3D<T, TPixel>)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[Float3 uvw] => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture3D<T, TPixel>)}[{typeof(Float3)}]");
|
||||
public ref readonly TPixel Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadOnlyTexture3D<T, TPixel>)}.{nameof(Sample)}({typeof(Float3)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override string ToString()
|
||||
|
||||
@@ -95,10 +95,10 @@ partial class ReadWriteTexture2D<T, TPixel>
|
||||
public ref readonly TPixel this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}[{typeof(Int2)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[float u, float v] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}[{typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly TPixel Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[Float2 uv] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}[{typeof(Float2)}]");
|
||||
public ref readonly TPixel Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Width => this.owner.Width;
|
||||
|
||||
@@ -95,10 +95,10 @@ partial class ReadWriteTexture2D<T>
|
||||
public ref readonly T this[Int2 xy] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}[{typeof(Int2)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly T this[float u, float v] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}[{typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly T Sample(float u, float v) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly T this[Float2 uv] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}[{typeof(Float2)}]");
|
||||
public ref readonly T Sample(Float2 uv) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture2D<T>.ReadOnly)}.{nameof(Sample)}({typeof(Float2)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Width => this.owner.Width;
|
||||
|
||||
@@ -92,10 +92,10 @@ partial class ReadWriteTexture3D<T, TPixel>
|
||||
public ref readonly TPixel this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}[{typeof(Int3)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[float u, float v, float w] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}[{typeof(float)}, {typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly TPixel Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly TPixel this[Float3 uvw] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}[{typeof(Float3)}]");
|
||||
public ref readonly TPixel Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T, TPixel>.ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Width => this.owner.Width;
|
||||
|
||||
@@ -92,10 +92,10 @@ partial class ReadWriteTexture3D<T>
|
||||
public ref readonly T this[Int3 xyz] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}[{typeof(Int3)}]");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly T this[float u, float v, float w] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}[{typeof(float)}, {typeof(float)}, {typeof(float)}]");
|
||||
public ref readonly T Sample(float u, float v, float w) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}.{nameof(Sample)}({typeof(float)}, {typeof(float)}, {typeof(float)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public ref readonly T this[Float3 uvw] => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}[{typeof(Float3)}]");
|
||||
public ref readonly T Sample(Float3 uvw) => throw new InvalidExecutionContextException($"{typeof(ReadWriteTexture3D<T>.ReadOnly)}.{nameof(Sample)}({typeof(Float3)})");
|
||||
|
||||
/// <inheritdoc/>
|
||||
public int Width => this.owner.Width;
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする