amerkoleci / Vortice.Windows

.NET bindings for Direct3D12, Direct3D11, WIC, Direct2D1, XInput, XAudio, X3DAudio, DXC, Direct3D9 and DirectInput.
MIT License
1.01k stars 73 forks source link

MaxLOD Capped #383

Closed spencer-e-pnt closed 1 year ago

spencer-e-pnt commented 1 year ago

I've noticed that when creating a ID3D11SamplerState, the MaxLOD gets set to 0 instead of the value I passed in the SamplerDescription. I've tested with the projects in the Vortice.Windows.Samples repo, and have seen the same result. This is preventing me from sampling at different mip-levels in my pixel shader.

To test, clone the Vortice.Windows.Samples repo, run the D3D11 project DrawTexturedCube with a break point here. Inspect the _textureSampler.Description and note the MaxLOD value.

You can also test it with this code in a D3D11 project: var textureSampler = Device.CreateSamplerState(SamplerDescription.LinearWrap);

Is anyone experience this? Does anyone know if this is related to my hardware or if it's a bug in the framework?

Thanks in advance, and thank you @amerkoleci for your hard work on this framework!

amerkoleci commented 1 year ago

Hi, Thanks for finding this issue, the next 2.4.1-beta nuget contains fix (https://github.com/amerkoleci/Vortice.Windows/commit/1845cc46a65698cc6b3c620253e760bcda2b2de4)

Cheers

spencer-e-pnt commented 1 year ago

Thank you!