how to disable the filtering on texture
Blitz3D Forums/Blitz3D Beginners Area/how to disable the filtering on texture
| ||
Hello, I have read several posts on the forum but i have still not managed to remove the automatic filtering on textures, all textures look blurred, especially when the camera is close. How to disable this automatic filtering for all textures, or if it is too slow to render this way, at least for some textures ? here is an example of what i mean : Thanks, |
| ||
I have tried to use ClearTextureFilters() and TextureFilter() but it does not seem to remove the filtering effect on the texture or maybe i don't use it correctly : |
| ||
i thought that the blurred effect was because of mipmapping http://en.wikipedia.org/wiki/Mipmap but after having read this topic : http://www.blitzbasic.com/Community/posts.php?topic=95323 it seems that the blurred effect is because of bilinear filtering http://en.wikipedia.org/wiki/Bilinear_filtering What can i do to desactivate this filtering ? |
| ||
I don't know what you hope to see. The lines in the image are 1 pixel wide. When the texture is displayed on screen this becomes about 6 pixels for distant points and 15 pixels for close ones. That transition can be smooth ( blurry ) or it could be a stairstep effect. But it can't be clean lines like the image. Here is your program with the rectangles replaced by a single line for simplicity. |
| ||
Thanks for the explanation. I will try to find another way without using textures (only meshes and vertex color) |
| ||
Is it possible to have no smooth effect ? To have the texels displayed with their exact color and without blurring near the sides even if there is a stairstep effect ? Is it possible to do that ? If yes how ? |
| ||
Here is the relevant post: Here's how to disable filtering! And this should help you out: Click here! |
| ||
feeble1>>Very good ! Exactly the render i wanted to have. Thank you very much ! Is there any compatibility problem or perfommance hit to use this rather than the default filtering ? Thanks again :) |
| ||
There should be no performance issues. If you stretch a small texture over a large surface, it would appear pixelated instead of the default smoothing. |
| ||
Ok, good. |
| ||
new link with an example : http://tempsend.com/0E19532EC9 |
| ||
AWESOME! |
| ||
new link with example : http://tempsend.com/98DF7E1D69 |
| ||
Um..... Link down... |
| ||
http://tempsend.com/6722B00BCD |
| ||
Now that link is down I have an alternative file which is a stripped down file of some dll that Ive been using which disables the filter I might attach it in a bit |
| ||
new link : http://rd-stuff.fr/disable-bilinear-filtering-of-textures-201509131549.zip |
| ||
new version (i have modified the values sent to the functions according to the directx documentation) : http://rd-stuff.fr/disable-bilinear-filtering-of-textures-201612021732.zip It works well here... |