Sign in to follow this  
matt77hias

Texture aliasing

Recommended Posts

DXGI_SAMPLE_DESC is for MSAA - which cleans up rasterization aliasing along the edges of triangles.

Yep, your ID3D11SamplerState is probably using a bad filter. You want linear with mip-mapping, which means that you also need to ensure that all of your textures have mipmaps.

Share this post


Link to post
Share on other sites

Looks like your doing point sampling, so try another filter like hodgman said, linear filtering is a good one.

https://msdn.microsoft.com/en-us/library/windows/desktop/ff476132(v=vs.85).aspx

If your going to use mip mapping, you'll need to generate the mipmaps for your srv. You can do it manually or simply by calling the GenerateMips method of the device context, passing in your srv

Share this post


Link to post
Share on other sites

Be aware that GenerateMips requires you to create your textures with D3D11_BIND_RENDER_TARGET, D3D11_BIND_SHADER_RESOURCE and D3D11_RESOURCE_MISC_GENERATE_MIPS.

In other words it's primarily provided for cases where you need to mipmap a render target, and may be suboptimal in the more general case.

Since you say you're loading DDS files anyway, why not pre-generate the miplevels (using your preferred DDS authoring tool) and store them in the DDS file?  This will only cost a fraction of extra storage but may get you faster loading and will allow you to use a higher quality mipmap generation algorithm.

Share this post


Link to post
Share on other sites
Although the screenshot is not clear, I see no evidence that the floor has mipmaps.

You're right thanks. Thought I converted all 53 .png's to .dds's with mip maps except for the floor.

Now with mip maps, the flickering while moving is gone.

Edited by matt77hias

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this