I have been trying to get the highest mipmap level to show for a long time now but nothing seems to work and the output always shows one of the lower mipmap levels. I tried creating a sampler state like this:
D3D11_SAMPLER_DESC samplerDesc;
ZeroMemory(&samplerDesc, sizeof(D3D11_SAMPLER_DESC));
samplerDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.ComparisonFunc = D3D11_COMPARISON_NEVER;
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MinLOD = 0.0f;
samplerDesc.MaxLOD = 0.0f;
HRESULT HR = device->CreateSamplerState(&samplerDesc, &anisotropicSamplerState);
if(FAILED(HR))
{
MessageBox( nullptr, TEXT("Failed to create rasterizer state"), TEXT("Error"), MB_OK );
return false;
}
but changing that seems to toggle between the last two mip levels. I have also tried to do it in the shader
float4 baseColor = Albedo.SampleLevel(samplerState, IN.texCoord, 0);
This also does not have any effect. Am I doing it the right way or is there another method?