Coder Social home page Coder Social logo

Comments (4)

solidpixel avatar solidpixel commented on August 14, 2024 1

Why do you need to decompress? Surely the point is to select formats the GPU can access natively in hardware.

Q1: Is there any possibility to merge contexts with different block sizes and HDR/LDR settings into a big one?

HDR is a superset of LDR, so you can use a HDR context to decompress LDR images already.

Merging block sizes won't help - you just make the context linearly bigger.

Q2: Starting from #246, are there any opportunities to further reduce memory overhead?

Probably. PR's welcome ...

Q3: Can ASTCENC_BLOCK_MAX_TEXELS be changed to (c++) template?

No - it gets used by the preprocessor.

from astc-encoder.

solidpixel avatar solidpixel commented on August 14, 2024 1

Templates can be helpful in creating a 5x5 context with a smaller memory footprint

Using templated structures would change the size of the structs used in the context, so you'd need to build N templated versions of the codec, one per block size, so the code size would jump for the N combinations.

The bulk of the memory comes from the decimation tables, and then the partition tables. If you know which decimation modes and partitionings your textures actually use, the fastest way to reduce memory footprint is to filter out the creation of the entries you don't need at context creation time.

from astc-encoder.

NoSW avatar NoSW commented on August 14, 2024

Why do you need to decompress?

Not all GPUs implementing ASTC support the HDR profile.

Do you mean I should choose the format supported by the GPU rather than the specific astc block size?

Since the data is a Texture3DArray with dimensions of 5x5x5, there is no spatial continuity between them. So some formats may not be quite suitable, such as the 4x4 block size of BCn/ETC2. Therefore, I have chosen the astc 5x5 and 5x5x5 with a CPU decompressor.

HDR is a superset of LDR, so you can use a HDR context to decompress LDR images already.

👍

No - it gets used by the preprocessor.

Templates can be helpful in creating a 5x5 context with a smaller memory footprint if the ASTCENC_BLOCK_MAX_TEXELS=5x5x5 build option is enabled. However, it does not adhere to the API style of this library :(

from astc-encoder.

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.