Added unorm texture interface types

このコミットが含まれているのは:
Sergio Pedri committed 2021-01-06 16:09:36 +01:00
1 親 a126052185
コミット c2f6e81e76
8ファイル変更
+118 -50

検索条件に一致するファイルはありません

+26
ファイルの表示
@@ -0,0 +1,26 @@
namespace ComputeSharp
{
/// <summary>
/// An interface representing a typed readonly 2D texture containing normalized pixel data stored on GPU memory.
/// This interface can only be used to wrap <see cref="ReadOnlyTexture2D{T, TPixel}"/> instances.
/// </summary>
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
public interface IReadOnlyTexture2D<TPixel>
where TPixel : unmanaged
{
/// <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>
/// <param name="y">The vertical 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>
public TPixel this[int x, int y] { get; }
/// <summary>
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture.
/// </summary>
/// <param name="xy">The 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>
public TPixel this[Int2 xy] { get; }
}
}
+27
ファイルの表示
@@ -0,0 +1,27 @@
namespace ComputeSharp
{
/// <summary>
/// An interface representing a typed readonly 3D texture containing normalized pixel data stored on GPU memory.
/// This interface can only be used to wrap <see cref="ReadOnlyTexture3D{T, TPixel}"/> instances.
/// </summary>
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
public interface IReadOnlyTexture3D<TPixel>
where TPixel : unmanaged
{
/// <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>
/// <param name="y">The vertical offset of the value to get.</param>
/// <param name="y">The depthwise 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>
public TPixel this[int x, int y, int z] { get; }
/// <summary>
/// Gets a single <typeparamref name="TPixel"/> value from the current readonly texture.
/// </summary>
/// <param name="xyz">The 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>
public TPixel this[Int3 xyz] { get; }
}
}
+26
ファイルの表示
@@ -0,0 +1,26 @@
namespace ComputeSharp
{
/// <summary>
/// An interface representing a typed writeable 2D texture containing normalized pixel data stored on GPU memory.
/// This interface can only be used to wrap <see cref="ReadWriteTexture2D{T, TPixel}"/> instances.
/// </summary>
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
public interface IReadWriteTexture2D<TPixel>
where TPixel : unmanaged
{
/// <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>
/// <param name="y">The vertical 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>
public ref TPixel this[int x, int y] { get; }
/// <summary>
/// Gets or sets a single <typeparamref name="TPixel"/> value from the current writeable texture.
/// </summary>
/// <param name="xy">The 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>
public ref TPixel this[Int2 xy] { get; }
}
}
+27
ファイルの表示
@@ -0,0 +1,27 @@
namespace ComputeSharp
{
/// <summary>
/// An interface representing a typed writeable 2D texture containing normalized pixel data stored on GPU memory.
/// This interface can only be used to wrap <see cref="ReadWriteTexture3D{T, TPixel}"/> instances.
/// </summary>
/// <typeparam name="TPixel">The type of normalized pixels used on the GPU side.</typeparam>
public interface IReadWriteTexture3D<TPixel>
where TPixel : unmanaged
{
/// <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>
/// <param name="y">The vertical offset of the value to get.</param>
/// <param name="z">The depthwise 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>
public ref TPixel this[int x, int y, int z] { get; }
/// <summary>
/// Gets a single <typeparamref name="TPixel"/> value from the current writeable texture.
/// </summary>
/// <param name="xyz">The 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>
public ref TPixel this[Int3 xyz] { get; }
}
}