ID3DXSprite and MipFilter

Started by
2 comments, last by Supernat02 19 years, 7 months ago
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?
________________
"I'm starting to think that maybe it's wrong to put someone who thinks they're a Vietnamese prostitute on a bull"       -- Stan from South Park
Lab74 Entertainment | Project Razor Online: the Future of Racing (flashsite preview)
Advertisement
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.

EvilDecl81
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.
________________
"I'm starting to think that maybe it's wrong to put someone who thinks they're a Vietnamese prostitute on a bull"       -- Stan from South Park
Lab74 Entertainment | Project Razor Online: the Future of Racing (flashsite preview)

This topic is closed to new replies.

Advertisement