I come today with a question, and depending on the answer, a possible bug for the support of .basis files (I did not test .ktx2 yet).
Is mipmap supposed to be supported with .basis texture ?
According to the documentation:
The compressor is able to exploit color and pattern correlations across the entire file, so multiple images with mipmaps can be stored very efficiently in a single file.
I would say it is supposed to be supported, but according to my experimentations, it is not…
The aliasing is clearly visible in the example playground, but if you go check the parameters of the texture in the inspector (which breaks the basis image by the way), you can see “has Mipmap Yes”…
I tested using both babylon 4.2 and 5.0-alpha, but both seems to have the same issue.
I might have been mislead by the playground, as there are two distinct visual aspects…
The inspector bug when inspecting the gpu compressed texture does not occur for .ktx2 images, in my case, and the -mipmap option has to be enabled for this format as well.
Thanks again for your answers, it’s really great to work with the engine!!
When we render a preview image in the inspector, we briefly set the texture sampling mode to nearest neighbor, before setting it back to the original sampling mode. Calling updateSamplingMode() on this texture for any sampling mode with a mips setting (eg. LINEAR_LINEAR_MIPLINEAR, NEAREST_NEAREST_MIPNEAREST) will break the texture. Other sampling modes (NEAREST_NEAREST) are fine.
This is particularly strange, because in theory, the texture already should have that sampling mode set. Why is not broken on initial load? I’m not sure. @bghgary any thoughts?
Note that it can be “unbroken” simply by setting the sampling mode to any of the functional models.
I am trying to create a simple repro in the playground to file an issue for this, but having a hard time getting it to repro. It seems to only break when used in a PBR material, but not as diffuse for a standard material. Not sure why yet.
Also, even with a working sampling mode, the inspector preview view still doesn’t work. That may be an inspector bug.
I’ll keep looking into this next week. Thanks for bringing it to our attention!
Sorry @Mickael_PASTOR, with Thanksgiving happening last week I let this fall by the wayside for a bit. I’m looking into it right now and I’ll have issues open by the end of the day