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

[Feature Request] Mipmapping #87

Open
MicrolemurDev opened this issue Dec 20, 2021 · 5 comments
Open

[Feature Request] Mipmapping #87

MicrolemurDev opened this issue Dec 20, 2021 · 5 comments
Labels
Feature Request A request for a new feature

Comments

@MicrolemurDev
Copy link

While technically a map is generated due to how WebGL works, it would be helpful to have mipmapping levels like Minecraft does. This is just a QoL feature that just is a bit of eye candy without killing FPS (It just increases Video RAM requirements)

@Mist-Stego
Copy link

Mipmapping levels could be good, but it would be a burden on people who do not have a dedicated graphics card. I think that Willard could consider it if he made requirements to play, but my laptop at the moment has almost no VRAM and a 7 year-old i5 intel processor. You can (probably) see where I am going with this 🤣

@Willard21
Copy link
Owner

I have no idea what Minecraft's mipmap levels do. Mipmapping is already enabled, and it only brings the texture size from 262KB to 393KB. Mipmapping is either on or off. If it's on, then it generates textures at 8x8, 4x4, 2x2, and 1x1 to match the original 16x16 texture. Then if the texture is being drawn on the screen super far away, it'll use the mipmap level that's closest to the rendered size.
image

@MicrolemurDev
Copy link
Author

Yeah I looked at the code and found that mipmapping is used. I don't know how this would be implemented though.

@Willard21
Copy link
Owner

I heard that there's some texture bleeding for some people. I read that generating my own mipmaps could fix that, but it still wouldn't be a customizable setting since WebGL requires mipmaps to be defined for all levels down to 1x1.

@MicrolemurDev
Copy link
Author

For the texture bleeding you could also attempt to use texture arrays over a texture atlas if you are willing to upgrade to WebGL2 (caniuse.com suggests ~90% of systems support WebGL2, with texture arrays being a feature of it).

For my improved mipmapping suggestion you might be able to try build a translucent shader pass which would allow you to use filtering on the non-translucent textures (playing around with a modified version of the codebase based upon the KA version shows artifacts when using filtering on translucents but not on blocks with no transparency). Albeit, this is not an ideal solution but it is one option if you are looking to also do some post-processing effects on the transparent textures and are fine with using an additional texture unit.

TLDR; Texture arrays could help texture bleeding, and texture filtering is a complex issue.

@Willard21 Willard21 added the Feature Request A request for a new feature label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature
Projects
None yet
Development

No branches or pull requests

3 participants