Exemplo n.º 1
0
        public GpuSamplerState(GpuDevice device,
                               GpuTextureAddressMode addressU,
                               GpuTextureAddressMode addressV,
                               GpuTextureAddressMode addressW,
                               GpuTextureFilter filter = GpuTextureFilter.MinMagMipLinear)
        {
            GpuDevice = device;

            //set address mode
            AddressU = addressU;
            AddressV = addressV;
            AddressW = addressW;

            Filter = filter;

            mSamplerState = new SharpDX.Direct3D11.SamplerState(GpuDevice.Device, new SharpDX.Direct3D11.SamplerStateDescription()
            {
                AddressU           = GpuConvert.ToTextureAddressMode(AddressU),
                AddressV           = GpuConvert.ToTextureAddressMode(AddressV),
                AddressW           = GpuConvert.ToTextureAddressMode(AddressW),
                Filter             = GpuConvert.ToTextureFilter(Filter),
                ComparisonFunction = SharpDX.Direct3D11.Comparison.Never,
                MinimumLod         = float.MinValue,
                MaximumLod         = float.MaxValue,
                BorderColor        = new SharpDX.Mathematics.Interop.RawColor4(1, 1, 1, 1),
                MaximumAnisotropy  = 4,
                MipLodBias         = 0.0f
            });
        }
Exemplo n.º 2
0
 public static SharpDX.Direct3D11.Filter ToTextureFilter(GpuTextureFilter textureFilter)
 {
     return((SharpDX.Direct3D11.Filter)textureFilter);
 }
Exemplo n.º 3
0
 public GpuSamplerState(GpuDevice device,
                        GpuTextureAddressMode addressUVW = GpuTextureAddressMode.Clamp,
                        GpuTextureFilter filter          = GpuTextureFilter.MinMagMipLinear) : this(device, addressUVW, addressUVW, addressUVW, filter)
 {
 }