bo3b / 3Dmigoto

Chiri's DX11 wrapper to enable fixing broken stereoscopic effects.
Other
799 stars 126 forks source link

MipMaps #95

Open ekvasir opened 6 years ago

ekvasir commented 6 years ago

Is there a option to enable mipmaps?

DarkStarSword commented 6 years ago

You're going to need to give me a bit more context.

We have never explicitly added support for working with mipmaps because we haven't really had a use case to do so, but in a lot of cases they should work regardless... e.g. loading a dds file that contains mipmaps should work (in theory, though this has not been tested), and binding a resource with mipmaps to a shader resource (texture) allows the mip levels to be accessed via Load (which is something I have specifically used) or an appropriate sampler.

But since we haven't added explicit support there are limitations, e.g. binding a resource with mipmaps as a render target, depth buffer or UAV would only ever use the most detailed mip level, and there is no way to automatically generate mip-maps or select a specific mip level in arbitrary resource copying (all mip levels should be copied), so if you need something along those lines we would need more detail to understand your actual use case.

You can also force the number of mip levels in a [Resource] section with mips=n, but for the reasons outlined above that would not be very useful just yet.

ekvasir commented 6 years ago

i have replaced some textures with better quality textures that also have mipmaps but the mip maps aren't used by the game. in the sampler sate the mipLOADBias, minLOD and maxLOD are all set as 0.00 so I'm guessing that maxLOD needs to be above 0.00 for mips to function

DarkStarSword commented 6 years ago

Ok, so this falls under the TODO item of expanding 3DMigoto's ability to create and assign custom sampler states.

ekvasir commented 6 years ago

Ok Thanks for answering my questions