Sign in to follow this  
dhanji

ID3DXSprite and MipFilter

Recommended Posts

For some reason I am not able to disable mipfiltering when drawing sprites. I put my call to setsamplerstate after the call to sprite->Begin(alphablend | objectspace), and I even tried disabling min and mag filtering (setting them to none) but I can clearly see a lower level mipmap being used (or some kind of filtration which is blurring my textures). can anyone help?

Share this post


Link to post
Share on other sites
Quote:
Original post by dhanji
For some reason I am not able to disable mipfiltering when drawing sprites. I put my call to setsamplerstate after the call to sprite->Begin(alphablend | objectspace), and I even tried disabling min and mag filtering (setting them to none) but I can clearly see a lower level mipmap being used (or some kind of filtration which is blurring my textures). can anyone help?


D3DXSprite will ignore any renderstate that you give it. If your textures have mip levels, they will get used.

However, if your screen dimension matchs your sprite dimension, it won't matter. Texture blurring is likely happing because it is upscaleing or downscaling your images.

Share this post


Link to post
Share on other sites
Quote:
D3DXSprite will ignore any renderstate that you give it


Well, this is simply not true. ID3DXSprite is simply an encapsulation of a quad made up of 2 triangles and 4 vertices, and is pushed through the render pipeline (though without TnL) just like every other poly.

for instance, how would I be able to do additive blending without setting both SRC and DEST blendstates to ONE? Even otherwise I can employ the D3DXSPRITE_DONOTMODIFY_RENDERSTATE to force sprite to use existing device states.
However, my problem is that SamplerStates are ignored by the sprite (it still applies a mipfilter when mipfiltering on stage 0 is off).
I want to know how to get around this as setting the sampler state didnt work and so I doubt D3DXSPRITE_DONOTMODIFY_RENDERSTATE will work. turnpast's idea makes sense to me of forcing it to have no miplevel to work with, but that kinda seems like a band-aid fix...I mean what if I want the sprite mipmaped somewhere else?

thanks for ur answers guys.

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