Git Product home page Git Product logo

Comments (1)

MarkCallow avatar MarkCallow commented on July 20, 2024

-automipmap does not generate mipmaps. The documentation says:

        "  --automipmap A mipmap pyramid will be automatically generated when the KTX\n"
        "               file is loaded. This option is mutually exclusive with --levels\n"
        "               and --mipmap.\n"

The key here is "when the KTX file is loaded." I.e the pyramid is generated by OpenGL or Vulkan. This is indicated by setting levelCount in the .ktx2 file to 0.

Generating a pyramid within toktx is something that needs to be added and something I want. For that I would call the option --generatemipmap. I'd be happy to accept a PR to add this function.

To create a mipmapped .ktx2 file with toktx now, you have to specify --mipmap and provide each of the images on the command line or by listing the file names in a file referenced with @ on the command line. E.g.

toktx --mipmap --t2 out.ktx2 @mipfilelist.txt

Be aware that basisu_tool -mipmap option only really works for 1D or 2D images as it puts the mip levels immediately after the base image. When loading, e.g. array textures you need the images for each layer of the array of the same level together sequentially. This means we cannot simply use the basisu_encoder mipmap generation functionality.

Since --automipmap does work as intended, I'm going to close this. Please open another issue for adding mipmap generation functionality.

from ktx-software.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.