ID3DXSprite and MipFilter
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?
How are you creating your textures? If you create/load them with Levels==0 then sublevels are automaticaly generated.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement