Texture blurring problem?

Blitz3D Forums/Blitz3D Programming/Texture blurring problem?

Chroma(Posted 2011) [#1]
I've done some searching and it's still not possible to load a texture with no blurring? ClearTextureFilters right after Graphics3D and setting the load flag to 1 or 1+256 doesn't work.

Did anyone figure out how to do it?


Yasha(Posted 2011) [#2]
Same topic as here: http://www.blitzbasic.com/Community/posts.php?topic=95288

Short Answer: You can't. Disabling bilinear filtering is simply not an option presented by Blitz3D.

Long answer: You can probably do this manually (and painfully) using one of the simple DX7 libraries floating around, or you can do it in one command with FastExtension.

i.e. This is a specific feature of extension libraries. You will need one to get it.


GfK(Posted 2011) [#3]
I have a DLL which can do this. It was created by Tom Speed though so I can't distribute it. Not sure if he's still around here to ask.

It is possible, though.


Chroma(Posted 2011) [#4]
I own FastExt already so I'll give that a go. Thanks.

GfK, can you tell me the name of the .dll made by Tom?


GfK(Posted 2011) [#5]
The file I have is called texture_filters_dll.zip (39KB), and contains three files:

dx7test.decls
dx7test.dll
texture_filters.bb


Chroma(Posted 2011) [#6]
Anyone know if Tom is still around here these days? And when he distro'd it I'm assuming it was free?


Adam Novagen(Posted 2011) [#7]
If he's talking Minecraft clone, then I don't think he means anisotropic filtering; that just ensures that textures maintain their visual quality at a distance. The "blurring" Chroma is referring to is, I believe, the smoothing of the texture's individual pixels. For a clear example, the original PlayStation had non-smoothed textures, as I believe did the SEGA Saturn. The N64 and all consoles since, however, have the same texture smoothing as all graphics cards today.


Yasha(Posted 2011) [#8]
Let's avoid confusion. This is what Blitz3D does, and what you can't turn off:


This is what I believe is desired:


These two pics taken from the FastExt demo "FastExt_Example_TextureFiltering.bb".

Last edited 2011


Ross C(Posted 2011) [#9]
Yep, bilinear filtering. WOuld be nice to have a default option to turn it off :)


Vorderman(Posted 2011) [#10]
Try saving your texture as a DDS - you can specify the mip-map levels within the texture in that format.


Adam Novagen(Posted 2011) [#11]
@Yasha Er, yes. Bilinear filtering also encompasses the texture smoothing? Did not know that; I always thought that was a separate filter.


Ross C(Posted 2011) [#12]
Bilinear filtering and mipmapping are two different things really. The purpose of the mipmaps are to produce a texture that fits the pixel on the screen and save on the drawing resouces. The idea being there is no point trying to represent 16 x 16 texels on a 2 x 2 pixel area.

Bilinear filtering is the actual blurring of the texels that make up the texture, shown in Yasha's images. You could make the texture bigger, and use 2 x 2 texels to represent a single texel, but good chance this might kill your frame rate.