Any way to turn of filtering on textures?

Blitz3D Forums/Blitz3D Programming/Any way to turn of filtering on textures?

John Pickford(Posted 2004) [#1]
I think I know the answer so perhaps this is a feature request. Is this even possible (I mean do cards support it)?

My game uses tiles laid out on a big texture. I've stopped bleeding making by tiles 2 pixels bigger than the graphic and repeating pixels all around.

But there is still a clash between the soft filtering within a tile and the hard edge. I've got my game looking mostly okay but I reckon it would look better without the filter.


DrakeX(Posted 2004) [#2]
no.

i hate it really badly, but no, you can't turn off the filtering.

and no, turning off mipmapping is not what he's looking for, everyone else.


Gabriel(Posted 2004) [#3]
and no, turning off mipmapping is not what he's looking for, everyone else.


Lol, yep, you invariably get a few of those when you actually want to turn off texture filtering.

Is this even possible (I mean to cards support it)?


Yes, I'm pretty sure it's possibly and very, very useful, but not possible in Blitz. Not to make this about my own feature request, but they do kinda go hand in hand. It's because we have to keep surface count down so badly in order to avoid crippling the frame rate that we have to use tiles on a big texture so often. I've tried it myself, and the two pixel border is a decent kludge, but it's far from perfect.


skidracer(Posted 2004) [#4]
now the d3d7 device is exposed in Blitz3D and if you want to get your hands dirty in C you should be able to do something like:

for (n=0;n<8;n++)
{
d3d7->SetTextureStageState( n,D3DTSS_MINFILTER,D3DTFN_POINT );
d3d7->SetTextureStageState( n,D3DTSS_MAGFILTER,D3DTFG_POINT );
d3d7->SetTextureStageState( n,D3DTSS_MIPFILTER,D3DTFP_NONE );
}


John Pickford(Posted 2004) [#5]
Does that mean doing stuff like distributing Dll's?

No chance of:

Filter False

?


jfk EO-11110(Posted 2004) [#6]
Can't you solve your problem with turning off clamping UVs using the texture flags 16 and 32?


John Pickford(Posted 2004) [#7]
No.


AntonyWells(Posted 2004) [#8]
Texture_Filter MyTexture,0
(Oh wait, you didn't mean vivid? ;p)
-

Sorry, couldn't resist. But as far as doing it in blitz3d goes, where are the dx7 sdk's located these days?
I may do a little userlib just for fun.(I.e free)


Beaker(Posted 2004) [#9]
DX7 SDK:
http://nebula.student.utwente.nl/downloads/dx7sdk.zip


Dreamora(Posted 2004) [#10]
ClearTextureFilters at the start might help as well, as mipmapping is autoactivated if that is not called at program start.


morduun(Posted 2004) [#11]
@John: Now that the underlying DX7 interface to Blitz is exposed, I'd wager that pretty much no requests of this nature will get into native B3D -- why else would BR have exposed the entire interface if it weren't to [enable users to modify the engine themselves / abandon responsibility for updating the engine] <- (choose your interpretation).

Would be nice (as would a fix for surfaces, a working AntiAlias command and a small horde of other niggling loose ends), but I honestly don't expect to see any further D3D functionality exposed by native B3D commands from now on.


DrakeX(Posted 2004) [#12]
"ClearTextureFilters at the start might help as well, as mipmapping is autoactivated if that is not called at program start"

what did i say, dreamora ;)


Dreamora(Posted 2004) [#13]
but you are not the poster so your posting does not really count or interest doesn't it?

And calling the thing that blitz3d uses filtering is a quite bad thing ... thats bilinear in best case but not trilinear or anisotrop which could be called filtering at all, no?


AntonyWells(Posted 2004) [#14]
Blitz does offer trilinear filtering, though? No filtering = per pixel mapping. Linear = Linear maginification, unfilted minifigation. bilinear = linear mag and min, and finally tri-linear = linear_mipmapped_mag, linear min, which is b3d's default state.
I'd say it's a overprotective use of lod bias that's responsible for the blurry washed out look a lot of textures in b3d suffer from.


Gabriel(Posted 2004) [#15]
@John: Now that the underlying DX7 interface to Blitz is exposed, I'd wager that pretty much no requests of this nature will get into native B3D -- why else would BR have exposed the entire interface if it weren't to [enable users to modify the engine themselves / abandon responsibility for updating the engine] <- (choose your interpretation).


Glad I'm not the only cynic with that interpretation ;)


DrakeX(Posted 2004) [#16]
"but you are not the poster so your posting does not really count or interest doesn't it?"

what? i'm just not understanding what you're trying to say with that group of words.

"Blitz does offer trilinear filtering, though?"

and nothing else, which is the problem ;) it's not possible to turn this filtering off.


Tom(Posted 2004) [#17]
I think BR don't like to add stuff that 'works on some cards, doesn't on others', i.e, they play it safe and that's why BB is as bug free as it is.

Drake: you can turn off filtering for any texture via the SDK.

First off, sorry for the big piccy :)

Lowering the mipmap lod bias a bit improves the look of an image, adjusting the setting skid mentioned changes blending between mipmaps, and toggles filtering on/off.




Dreamora(Posted 2004) [#18]
This is part of actual drivers anyway. Never have such boundings with my actual catalyst set to max mipmap settings ...


John Pickford(Posted 2004) [#19]
To be clear, I'm not talking about mip-mapping I need to switch of bilinear filtering. I want basic point-sampling. Is there a card compatibility issue with this?


DrakeX(Posted 2004) [#20]
no, and in fact, the default mode IS linear sampling. extremely old cards had nothing else.

like was mentioned before, it might be possible with the DX7 access, especially since B3D never changes it. wouldn't have to worry about the engine changing it back, if it's always set on bilinear.


Zenith(Posted 2004) [#21]
I want this badly also. My 2d game would like this.


Dock(Posted 2005) [#22]
Tom Speed - did you ever figure out a way to reduce LOD/Mip bias in Blitz3d?
[edit] NM I just found this (by you ^_^): http://www.blitzbasic.co.nz/Community/posts.php?topic=40792


{cYan|de}(Posted 2005) [#23]
are you drunk


Barliesque(Posted 2005) [#24]
Hey Dock, that's a link to *this* thread! :D


(tu) ENAY(Posted 2005) [#25]
Well. This also gets my vote. :)