Khronos Public Bugzilla
Bug 22 - <mipfilter> should be moved from <sampler> to <surface>
: <mipfilter> should be moved from <sampler> to <surface>
Status: RESOLVED FIXED
Product: COLLADA
Classification: Unclassified
Component: Schema
: 1.4.1
: PC Windows
: P3 minor
: ---
Assigned To: Daniel Horowitz
:
: collada-fx
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-26 14:20 PDT by Steven Thomas
Modified: 2008-06-28 06:04 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Thomas 2006-09-26 14:20:28 PDT
The <mipfilter> element currently inside <sampler*> controls how mipmaps are generated when automatic mipmap generation is requested. Unlike <minfilter> and <magfilter>, which just control how the texture is sampled, <mipfilter> actually affects how the texture is created and initialized. For that reason <mipfilter> should probably be inside the <surface> element instead.

Instead of moving <mipfilter>, another option is to drop the element entirely. The only possible values are Nearest and Linear, and I'm sure that everyone will be using Linear, so <mipfilter> could probably just be removed.

Since making any of these changes will break backward-compatibility, I understand that nothing can be done about this for a while. It's a minor issue anyway.

See the following thread for more details:
https://collada.org/public_forum/viewtopic.php?t=577&sid=f70b2388e68ef45112b2101479b1758f
Comment 1 Mark Barnes 2006-09-26 20:41:33 PDT
Assigned.
Comment 2 Mark Barnes 2008-05-10 18:55:05 PDT
Daniel can you comment on this one?
Comment 3 Marius 2008-06-28 06:04:56 PDT
From the DirectX 9 documents, I found at the texldl docs next pseudocode that seems to state the interrelationships between the filters.

LOD = src0.w + LODBIAS;
if (LOD <= 0 )
{
   LOD = 0;
   Filter = MagFilter;
   tex = Lookup( MAX(MAXMIPLEVEL, LOD), Filter );
}
else
{
   Filter = MinFilter;
   LOD = MAX( MAXMIPLEVEL, LOD);
   tex = Lookup( Floor(LOD), Filter );
   if( MipFilter == LINEAR )
   {
      tex1 = Lookup( Ceil(LOD), Filter );                        
      tex = (1 - frac(src0.w))*tex + frac(src0.w)*tex1;
   }
}

From this pseudocode, it seems that if you don't use a mipfilter, then only
one miplevel is the basis for a fetch.
If you use mipfilter == LINEAR, then apparently the linear interpolation between
two neighbouring miplevels form the basis for a fetch.

Still, it does not explain what I would like to know myself:
What does MipFilter == POINT and MipFilter == NONE do?

From my experiences, my first guess was that MipFilter == POINT 
behaves like in the pseudocode above (in case it does not equeal LINEAR), 
while MipFilter == NONE seems to make sure that only the first miplevel is used.