Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Enable anisotropic filtering  (Read 8144 times)

0 Members and 1 Guest are viewing this topic.

oomek

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • Email
Re: Enable anisotropic filtering
« Reply #15 on: February 05, 2018, 07:51:56 pm »
It should be relatively easy to implement according to this guide:
http://www.informit.com/articles/article.aspx?p=770639&seqNum=2

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Enable anisotropic filtering
« Reply #16 on: February 05, 2018, 09:49:36 pm »
Well I guess it could be done. The question is how to find a good API for implementing it. It would of course be nice to set a kind of level for the texture filtering. Something like
enum FilterLevel
{
    Nearest,
    BiLinear,
    Anisotropic
}
But it will be difficult to fit it to the current Texture::setSmooth API.

oomek

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • Email
Re: Enable anisotropic filtering
« Reply #17 on: February 05, 2018, 10:14:25 pm »
I don’t think we need an additional api to change the filtering to anisotropic. You just call glTexParameterf() which is used to set the bilinear filtering in SFML. The only problem is with checking if the device supports GL_EXT_texture_filter_anisotropic extension, but that is also one function call available in glTools. I’m preety sure i could set the aniso for all the textures by modifying just one line of SFML code, but without checking if it’s supported.
« Last Edit: February 05, 2018, 10:16:30 pm by oomek »

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Enable anisotropic filtering
« Reply #18 on: February 05, 2018, 11:48:10 pm »
Hmm I don't think it should be enabled by default when filtering is enabled, as it may come with quiet a performance impact (wikipedia).

oomek

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • Email
Re: Enable anisotropic filtering
« Reply #19 on: February 05, 2018, 11:52:59 pm »
Of course, it should be enabled per texture. It’s not expensive on the modern hardware, maybe on devices 10 year old. I’ve never experienced any fps drops, even by one frame when I was enabling aniso.

 

anything