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

compressed textures in WebGL #1182

Open
obiot opened this issue Apr 10, 2023 · 3 comments
Open

compressed textures in WebGL #1182

obiot opened this issue Apr 10, 2023 · 3 comments
Labels

Comments

@obiot
Copy link
Member

obiot commented Apr 10, 2023

one key feature still missing in melonJS, if anyone is up to it, is the ability to load compressed texture for WebGL, with the benefits of shorting loading time and using less VRAM.

At minima (if I'm correct), supporting ASTC (the new format for WebGL), DXT (for destop), PVR (for IOS) and ETC[1/2] (for Android).

Extra bonus, this tool could be integrated in the boilerplate build chain to automatically compress textures :
https://www.npmjs.com/package/texture-compressor/v/0.3.1

and last but not least an interesting article here about compressed textures:
https://www.shukantpal.com/blog/pixijs/do-not-use-uncompressed-textures/

@obiot obiot added the Feature label Apr 10, 2023
@CodeAndWeb
Copy link

You can also use TexturePacker for this - we support all these formats and in addition to that BasisU which is mentioned in the pixijs post.

BasisU uses a single texture file that is transcoded into the native formats. The only disadvantage is, that the transcoder WASM.

@obiot
Copy link
Member Author

obiot commented Oct 17, 2023

definitely, that's what I'm actually doing for now :)

on the article, I actually did not realise it was from pixi :P

@obiot
Copy link
Member Author

obiot commented Mar 21, 2024

following some recent code restructuring, the loader is now basically ready for compressed texture, see below:

// Compressed texture

https://github.com/melonjs/melonJS/tree/master/src/loader/parsers/compressed_textures

all remaining is to actually parse/transcode the texture themselves and upload them in the the GPU Ram.

obiot added a commit that referenced this issue Mar 23, 2024
obiot added a commit that referenced this issue Mar 23, 2024
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

2 participants