Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to render a plane mesh textured with a simple grid pattern, problem is, xna keeps mip-mapping the texture in horrible, horrible ways.

What i'm trying to achieve is to get this grid to look as close to vector graphics as possible. (So anisotropic filtering is out of the question, i must use Point/Wrap filtering):

        SamplerState ss = new SamplerState();
        ss.Filter = TextureFilter.Point;
        ss.MaxMipLevel = 0;
        ss.AddressU = TextureAddressMode.Wrap;
        ss.AddressV = TextureAddressMode.Wrap;
        GraphicsDevice.SamplerStates[0] = ss;

I've added some screenshots here!

If anyone has any ideas how to disable mip-mapping for the whole rendering process & make that grid look as sharp and crisp as possible from all angles, I would greatly appreciate it, thanks!

share|improve this question
    
Turn off mipmap generation for your texture? –  Andrew Russell Mar 31 '13 at 3:37
    
Could you not just render them as lines rather than a texture? –  RobCurr Mar 31 '13 at 5:52
    
@Andrew Russel: How can I turn mipmap generation for my texture? The texture is loaded from within the DirectX Model file (*.x) –  childonline Mar 31 '13 at 10:33
    
@RobCurr: Yes, I could just render them as lines, but that is not my goal here. –  childonline Mar 31 '13 at 10:36
1  
@Andrew Russell: Nevermind, I've fixed it, it's sort of a dirty hack, but i've set the MipMapLevelOfDetailBias of the SamlperState to -2, i don't know why it works, but it works. Here is a screen: imgur.com/OFbYAqE –  childonline Mar 31 '13 at 11:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.