尝试修改D3D11示例以在三角形上绘制纹理而不是颜色,但我得到的只是黑色。不知道我哪里错了:(
代码:
sampler = new SamplerState(device, new SamplerStateDescription()
{
Filter = Filter.MinMagMipLinear,
AddressU = TextureAddressMode.Clamp,
AddressV = TextureAddressMode.Clamp,
AddressW = TextureAddressMode.Clamp,
BorderColor = SharpDX.Color.Black,
ComparisonFunction = Comparison.Never,
MaximumAnisotropy = 16,
MipLodBias = 0,
MinimumLod = -float.MaxValue,
MaximumLod = float.MaxValue
});
MiniTri.fx: