Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Auto Generate MipMap Not Working

$
0
0

i want to use SampleLevel to use different mipmap levels manually but its not working as below image shows:

Untitled.png

as the picture shows it always use level 0 texture!

 

here is my code for loading a texture i use Directx Textue tool for loading also i use dx11:

HR(DirectX::CreateDDSTextureFromFileEx(
AngelCore::AngelSubSystemResources::GraphicDeviceResources::Device.Get(),
path.c_str(),MAXSIZE_T,D3D11_USAGE_DEFAULT,
D3D11_BIND_RENDER_TARGET | D3D11_BIND_SHADER_RESOURCE,0,
D3D11_RESOURCE_MISC_GENERATE_MIPS,false,
m_textureResource.GetAddressOf(), m_textureView.GetAddressOf()));

also i create my sampler state with below options:

D3D11_FILTER_ANISOTROPIC,D3D11_TEXTURE_ADDRESS_WRAP, D3D11_TEXTURE_ADDRESS_WRAP
, D3D11_TEXTURE_ADDRESS_WRAP, 
D3D11_COMPARISON_ALWAYS

what is the problem?


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>