Add interfaces for 1D texture types
このコミットが含まれているのは:
1 親
3e8d751b28
コミット
0d924830d9
3ファイル変更
+80
検索条件に一致するファイルはありません
@@ -0,0 +1,29 @@
|
||||
namespace ComputeSharp;
|
||||
|
||||
/// <summary>
|
||||
/// An interface representing a typed readonly 1D texture containing normalized pixel data stored on GPU memory.
|
||||
/// This interface can only be used to wrap <see cref="ReadOnlyTexture1D{T, TPixel}"/> instances.
|
||||
/// </summary>
|
||||
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
|
||||
public interface IReadOnlyNormalizedTexture1D<TPixel> : IGraphicsResource
|
||||
where TPixel : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
int Width { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture.
|
||||
/// </summary>
|
||||
/// <param name="x">The horizontal 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[int x] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly TPixel Sample(float u);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace ComputeSharp;
|
||||
|
||||
/// <summary>
|
||||
/// An interface representing a typed readonly 1D texture containing raw data stored on GPU memory.
|
||||
/// This interface can only be used to wrap <see cref="ReadOnlyTexture1D{T}"/> instances.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of raw data used on the GPU side.</typeparam>
|
||||
public interface IReadOnlyTexture1D<T> : IGraphicsResource
|
||||
where T : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
int Width { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="T"/> value from the current readonly texture.
|
||||
/// </summary>
|
||||
/// <param name="x">The horizontal 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[int x] { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 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>
|
||||
/// <remarks>This API can only be used from a compute shader, and will always throw if used anywhere else.</remarks>
|
||||
ref readonly T Sample(float u);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace ComputeSharp;
|
||||
|
||||
/// <summary>
|
||||
/// An interface representing a typed writeable 1D texture containing normalized pixel data stored on GPU memory.
|
||||
/// This interface can only be used to wrap <see cref="ReadWriteTexture1D{T, TPixel}"/> instances.
|
||||
/// </summary>
|
||||
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
|
||||
public interface IReadWriteNormalizedTexture1D<TPixel> : IGraphicsResource
|
||||
where TPixel : unmanaged
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the width of the current texture.
|
||||
/// </summary>
|
||||
int Width { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a single <typeparamref name="TPixel"/> value from the current writeable texture.
|
||||
/// </summary>
|
||||
/// <param name="x">The horizontal 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 TPixel this[int x] { get; }
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする