Any way to turn of filtering on textures?
Blitz3D Forums/Blitz3D Programming/Any way to turn of filtering on textures?
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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 ); } |
| ||
Does that mean doing stuff like distributing Dll's? No chance of: Filter False ? |
| ||
Can't you solve your problem with turning off clamping UVs using the texture flags 16 and 32? |
| ||
No. |
| ||
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) |
| ||
DX7 SDK: http://nebula.student.utwente.nl/downloads/dx7sdk.zip |
| ||
ClearTextureFilters at the start might help as well, as mipmapping is autoactivated if that is not called at program start. |
| ||
@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. |
| ||
"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 ;) |
| ||
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? |
| ||
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. |
| ||
@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 ;) |
| ||
"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. |
| ||
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. |
| ||
This is part of actual drivers anyway. Never have such boundings with my actual catalyst set to max mipmap settings ... |
| ||
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? |
| ||
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. |
| ||
I want this badly also. My 2d game would like this. |
| ||
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 |
| ||
are you drunk |
| ||
Hey Dock, that's a link to *this* thread! :D |
| ||
Well. This also gets my vote. :) |