Update texture sampling calls in unit tests

このコミットが含まれているのは:
Sergio Pedri committed 2022-08-09 17:37:54 +02:00
1 親 a7a4c22a9c
コミット 6c75394e22
5ファイル変更
+11 -11

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

+1 -1
ファイルの表示
@@ -111,7 +111,7 @@ internal readonly partial struct ContouredLayers : IPixelShader<float4>
// Layer color. Based on the shade, layer number and smoothing factor.
private float3 GetColor(float2 p, float sh, float fi)
{
float3 tx = texture[p + Hash21(new float2(sh, fi))].XYZ;
float3 tx = texture.Sample(p + Hash21(new float2(sh, fi))).XYZ;
tx *= tx;
+3 -3
ファイルの表示
@@ -226,11 +226,11 @@ public partial class D2D1PixelShaderTests
public Float4 Execute()
{
float4 pixel1 = myTexture1[0];
float4 pixel2 = myTexture1[0.4f];
float4 pixel2 = myTexture1.Sample(0.4f);
float4 pixel3 = myTexture2[0, 1];
float4 pixel4 = myTexture2[0.4f, 0.3f];
float4 pixel4 = myTexture2.Sample(0.4f, 0.3f);
float4 pixel5 = myTexture3[0, 1, 2];
float4 pixel6 = myTexture3[0.4f, 0.5f, 0.6f];
float4 pixel6 = myTexture3.Sample(0.4f, 0.5f, 0.6f);
return 0;
}
+4 -4
ファイルの表示
@@ -1288,7 +1288,7 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public float4 Execute()
{
return source[ThreadIds.Normalized.XY];
return source.Sample(ThreadIds.Normalized.XY);
}
}
@@ -1301,7 +1301,7 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public void Execute()
{
destination[ThreadIds.XYZ] = source[ThreadIds.Normalized.XYZ];
destination[ThreadIds.XYZ] = source.Sample(ThreadIds.Normalized.XYZ);
}
}
@@ -1313,7 +1313,7 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public float4 Execute()
{
return source[ThreadIds.Normalized.XY];
return source.Sample(ThreadIds.Normalized.XY);
}
}
@@ -1326,7 +1326,7 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public void Execute()
{
destination[ThreadIds.XYZ] = source[ThreadIds.Normalized.XYZ];
destination[ThreadIds.XYZ] = source.Sample(ThreadIds.Normalized.XYZ);
}
}
+1 -1
ファイルの表示
@@ -113,7 +113,7 @@ internal readonly partial struct ContouredLayers : IComputeShader
// Layer color. Based on the shade, layer number and smoothing factor.
private float3 GetColor(float2 p, float sh, float fi)
{
float3 tx = texture[p + Hash21(new float2(sh, fi))].XYZ;
float3 tx = texture.Sample(p + Hash21(new float2(sh, fi))).XYZ;
tx *= tx;
+2 -2
ファイルの表示
@@ -79,7 +79,7 @@ public partial class Texture2DTests
public void Execute()
{
destination[ThreadIds.XY] = source[ThreadIds.Normalized.XY];
destination[ThreadIds.XY] = source.Sample(ThreadIds.Normalized.XY);
}
}
@@ -111,7 +111,7 @@ public partial class Texture2DTests
public float4 Execute()
{
return texture[ThreadIds.Normalized.XY];
return texture.Sample(ThreadIds.Normalized.XY);
}
}