fix: remove wildcard GUI atlas sweep causing black screen on low-VRAM hardware#140
Merged
Merged
Conversation
PolyLib's assets/minecraft/atlases/gui.json used a directory source scanning textures/gui/ across ALL mod namespaces. In large modpacks (400+ mods), this swept hundreds of large GUI background textures into the minecraft:gui atlas, bloating it beyond GL_MAX_TEXTURE_SIZE on VRAM-constrained hardware (e.g. Intel HD 4600) causing black screens. Fix: move PolyLib sprites to textures/gui/sprites/ (already scanned by vanilla's atlas definition) and remove the custom atlas JSON entirely. Drop the 'gui/' prefix in PolyTextures.getUncached() to match vanilla's empty-prefix directory scan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PolyLib's
assets/minecraft/atlases/gui.jsonadded adirectorysource scanningtextures/gui/across all mod namespaces:{ "type": "directory", "source": "gui", "prefix": "gui/" }Vanilla MC only scans
textures/gui/sprites/(small purpose-built sprites). PolyLib's addition swept every mod'stextures/gui/directory — including large 256×256 container background textures that were never meant to be atlased.In large modpacks like ATM 11 (400+ mods), this bloats the
minecraft:guiatlas well beyond what VRAM-constrained hardware can handle. Reported as a black screen on Intel HD 4600 (shared VRAM, old driver reporting OpenGL 3.3,GL_MAX_TEXTURE_SIZElikely 4096–8192).Fix
assets/minecraft/atlases/gui.json— no more wildcard sweeptextures/gui/*→textures/gui/sprites/*— vanilla's atlas definition already scans this pathPolyTextures.getUncached()— drop thegui/prefix to match vanilla's empty-prefix directory scanWhy this works
Vanilla's
gui.jsonalready includes:{ "type": "minecraft:directory", "prefix": "", "source": "gui/sprites" }A texture at
assets/polylib/textures/gui/sprites/widgets/slot.pngbecomes spritepolylib:widgets/slotin theminecraft:guiatlas automatically. No custom atlas definition needed.Impact
PolyTextures.get("slots/dust")etc. are unaffected (thegui/prefix was added internally)Origin
The
directorysource was introduced by brandon3055 in Nov 2023 (MC 1.20) underassets/polylib/atlases/gui.jsonfor a PolyLib-specific atlas. Migrated toassets/minecraft/atlases/gui.jsonin May 2026 (commitafdd73e) to eliminate atlas registration mixins — but the wildcard sweep then began affecting the shared vanilla GUI atlas.