It seems that the issue is indeed related to mipmapping, as suggested by @eldee .
Specifically, the texture filter type used when viewing the texture from afar (“texture minification”) is set to FT_nearest_mipmap_linear
. Setting it to the default FT_linear
seems to fix the problem:
model = base.loader.load_model("cue.glb")
model.reparent_to(base.render)
tex = model.find_texture("cue")
tex.set_minfilter(SamplerState.FT_linear)
When in doubt, you can always print out a Texture to see its attributes:
print(tex)
which outputs:
2d_texture cue
2-d, 2569 x 1280 pixels, each 4 bytes, srgb_alpha
sampler wrap(u=repeat, v=repeat, w=repeat, border=0 0 0 1) filter(min=nearest_mipmap_linear, mag=linear, aniso=0) lod(min=-1000, max=1000, bias=0) 13153280 bytes in ram, compression off