Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding of Non Multiple of 4 Resolutions #31

Closed
ttoinou opened this issue Jul 19, 2018 · 2 comments
Closed

Decoding of Non Multiple of 4 Resolutions #31

ttoinou opened this issue Jul 19, 2018 · 2 comments
Labels

Comments

@ttoinou
Copy link

ttoinou commented Jul 19, 2018

Hello

I was wondering since DXT are 4x4 pixel blocks based, how does the decoding of non multiple by 4 dimensions happens ? Is the DXT texture (whose dimensions are multiple of 4) decoding into a bitmap with personalized resolution an extra step that takes extra time (compared to having a multiple by 4 resolution right from the beginning) ?{

Thanks !

@bangnoise
Copy link
Collaborator

No extra step. This is detailed in the specification, which is referenced from the Hap spec:
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc.txt

@mrvux
Copy link

mrvux commented Feb 15, 2019

As a side note, please notice that it's true for OpenGL 2.0+ (which I suppose every player nowadays is supporting), but DirectX requires a multiple of 4 .

So it should still be recommended to have a multiple of 4 from the beginning to enable gpu decoding without extra steps if you play on window.

As a side note codec wise exporter should likely export with multiple of 4 anyway, and maybe add a flag to report that (like many codecs if you try to export 2323 resolution would pad to 2424)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants