Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualCorvwyn

Posted 05 November 2012 - 01:00 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile (http://directxtk.cod...Title=DirectXTK), and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps (512x512 down to 1x1), but the call to CreateDDSTextureFromFile doesn't seem to be sufficient to load them. The documentation says that the loader supports mipmaps though (http://directxtk.cod...Title=DirectXTK).

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different and uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips shouldn't be necessary, right?

#6Corvwyn

Posted 05 November 2012 - 12:59 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile (http://directxtk.codeplex.com/wikipage?title=WICTextureLoader&referringTitle=DirectXTK), and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps (512x512 down to 1x1), but the call to CreateDDSTextureFromFile doesn't seem to be sufficient to load them. The documentation says that the loader supports mipmaps though (http://directxtk.cod...Title=DirectXTK).

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different since it uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips shouldn't be necessary, right?

#5Corvwyn

Posted 05 November 2012 - 12:58 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile, and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps (512x512 down to 1x1), but the call to CreateDDSTextureFromFile doesn't seem to be sufficient to load them. The documentation says that the loader supports mipmaps though (http://directxtk.codeplex.com/wikipage?title=DDSTextureLoader&referringTitle=DirectXTK).

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different since it uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips shouldn't be necessary, right?

#4Corvwyn

Posted 05 November 2012 - 12:58 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile, and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps (512x512 down to 1x1), but the call to CreateDDSTextureFromFile doesn't seem to be sufficient to load them. The documentation says that the loader supports mipmaps though.

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different since it uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips shouldn't be necessary, right?

#3Corvwyn

Posted 05 November 2012 - 12:55 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile, and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps, but the call to CreateDDSTextureFromFile doesn't seem to be sufficient. The documentation says that it supports mipmaps though.

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different since it uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips shouldn't be necessary, right?

#2Corvwyn

Posted 05 November 2012 - 12:55 AM

I tried converting the texture to .png and loading it with CreateWICTextureFromFile, and everything looks good. Since the dds file is more effective, I want to use that instead though.

The texture viewer I use shows that the .dds file contains all the mip maps, but the call to CreateDDSTextureFromFile doesn't seem to be sufficient. The documentation says that it supports mipmaps though.

The sampler uses these settings for LOD, which looks correct:
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

The only reference I see to creating a full mipmap chain is in the depthbuffer (setting this to 0 has no effect):
depthBufferDesc.MipLevels = 1;

Apparently the old D3DXLoadTextureFromFile is different since it uses mipmaps correctly. Since the dds already has mipmaps, GenerateMips should be necessary, right?

PARTNERS