does not help. These settings don’t override egg models own “minfilter” and “magfilter” properties.
“egg-ignore-filters” configuration variable also does nothing.
I can achieve the effect either by
changing texture filter for each model explicitly (I haven’t found the constants anywhere, so I assume 0 is “nearest”):
Setting texture-minfilter and texture-magfilter only changes the default setting. If you remove the minfilter and magfilter lines from your .egg file, you’ll notice that it is loaded as having the default setting.
The constant is called Texture.FT_nearest in 1.8, and SamplerState.FT_nearest in 1.9 (though the old syntax is also still accepted in 1.9). FT_nearest is indeed 0.
There’s no built-in way to override the filter type for all textures, besides something like:
for tex in model.find_all_textures():
tex.set_minfilter(SamplerState.FT_nearest)
tex.set_magfilter(SamplerState.FT_nearest)
Or, to make it affect all textures ever loaded from disk:
for tex in TexturePool.find_all_textures():
tex.set_minfilter(SamplerState.FT_nearest)
tex.set_magfilter(SamplerState.FT_nearest)
From what I can see in the source code, it changes the egg loader to set the minfilter and magfilter to “nearest” whenever it encounters a minfilter or magfilter instruction, besides printing a warning saying “Ignoring minfilter request” or something like that.
Hmm, works fine for me. I took a textured model, added in minfilter and magfilter definitions (set to “linear”), set egg-ignore-filters to “true” in Config.prc, and loaded the model in pview. Sure enough, I saw the warning messages, and the texture showed up with nearest filtering.
This is what the section in my .egg looks like:
<Texture> noise {
"maps/noise.rgb"
<Scalar> minfilter { LINEAR }
<Scalar> magfilter { LINEAR }
}
I’m using the latest master version of Panda3D, but I don’t think anything has changed between 1.9.0 and the latest master version.