SharpDX - 修改MiniTri示例以显示纹理

时间:2018-03-30 16:53:41

标签: c# directx directx-11 sharpdx

尝试修改D3D11示例以在三角形上绘制纹理而不是颜色,但我得到的只是黑色。不知道我哪里错了:(

代码:

https://pastebin.com/KVMTq9r6

    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:

https://pastebin.com/0w1myEg0

0 个答案:

没有答案