Fix 3D normalized sampling

このコミットが含まれているのは:
Sergio Pedri committed 2022-09-27 00:30:44 +02:00
1 親 25544fee7f
コミット 2f0ba6ff86
1ファイル変更
+12 -2
+12 -2
ファイルの表示
@@ -1347,7 +1347,12 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public void Execute()
{
destination[ThreadIds.XYZ] = source.Sample(ThreadIds.Normalized.XYZ);
float3 xyz = ThreadIds.Normalized.XYZ;
// The source has a depth of 3, but the destination has a depth of 2
xyz.Z = Hlsl.Lerp(0, 0.5f, xyz.Z);
destination[ThreadIds.XYZ] = source.Sample(xyz);
}
}
@@ -1396,7 +1401,12 @@ public partial class ComputeContextTests
/// <inheritdoc/>
public void Execute()
{
destination[ThreadIds.XYZ] = source.Sample(ThreadIds.Normalized.XYZ);
float3 xyz = ThreadIds.Normalized.XYZ;
// See comment in LinearSampling3DComputeShader
xyz.Z = Hlsl.Lerp(0, 0.5f, xyz.Z);
destination[ThreadIds.XYZ] = source.Sample(xyz);
}
}