Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3507 Members - Latest Member: Edgebteme

26. May 2012, 07:39:28 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Texture filter
Pages: [1]
Print
Author Topic: Texture filter  (Read 1052 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« on: 15. July 2008, 06:46:39 pm »

I am current working on the Appearance attributes. I have especially cleaned up the texture filters. Instead of strange names like NEAREST, LINEAR, LINEAR_MIPMAP_LINER, etc., which is very odd and which cannot be used uniformly for base-level- and multi-level-textures, I ended up with the following settings:

mag-filter:
  • POINT
  • BILINEAR

min-filter:
  • POINT
  • BILINEAR
  • TRILINEAR
  • ANISOTROPIC_2
  • ANISOTROPIC_4
  • ANISOTROPIC_8
  • ANISOTROPIC_16

These terms are very well known from common game settings and everyone will know, what to choose from these values. The rendering code chooses the correct OpenGL-values from these enum elements (in a much cheaper way than before).

Now I wonder, if there is any good reason to keep different settings for mag- and min filter (in the API).

Here is my question:
Does anybody use (e.g.) POINT filter for mag and LINEAR filter for min (at the same time)? I guess, nobody will do this and we can have a much simpler API, where we only have the settings of the above min-filter, which applies the best available for both.

This means, that if TRILINEAR is selected, mag-filter would use BILINEAR and min-filter would use TRILINEAR. If POINT is selected, both would use POINT, etc.

What do you think?

Marvin
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #1 on: 15. July 2008, 08:04:17 pm »

I opened up a collada file to see what the minfilter/magfilter were set as...

Code:
<minfilter>LINEAR_MIPMAP_LINEAR</minfilter>
<magfilter>LINEAR</magfilter>

I'm not that familiar with filters, what would that map to?
Logged

Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #2 on: 15. July 2008, 08:44:05 pm »

LINEAR_MIPMAP_LINEAR for min-filter means TRILINEAR and LINEAR for mag-filter means BILINEAR. So this would perfectly match.

Thanks for the research.

Marvin
Logged
hawkwind
Getting respectable
***
Offline Offline

Posts: 363



View Profile Email
« Reply #3 on: 16. July 2008, 12:32:59 am »

I think your potential changes are a good idea.  +1 from me.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic