question about texture management #13

Open
opened 2024-10-20 07:52:26 +00:00 by RedBlum · 2 comments
RedBlum commented 2024-10-20 07:52:26 +00:00 (Migrated from github.com)

Hi! I was wondering, why not make one texture file per block?
This would allow us to put a direct link to the block texture instead of the texture coordinates in a single file.

Hi! I was wondering, why not make one texture file per block? This would allow us to put a direct link to the block texture instead of the texture coordinates in a single file.
fintmc commented 2024-10-20 09:02:51 +00:00 (Migrated from github.com)

unless we put it all in an atlas at runtime which isnt too easy to do as it seems (+ given the codebase this has), when drawing blocks we'd need to switch the texture every time a different block face is drawn, which is kinda slow compared to if we were using the texture coords with only one texture. this also has the downside of slowing down start times by having to load each texture individually and having to allocate gpu memory and a texture object for each of them, which there is a limit on how many texture objects you can have at once.

hope this helps

unless we put it all in an atlas at runtime which isnt too easy to do as it seems (+ given the codebase this has), when drawing blocks we'd need to switch the texture every time a different block face is drawn, which is kinda slow compared to if we were using the texture coords with only one texture. this also has the downside of slowing down start times by having to load each texture individually and having to allocate gpu memory and a texture object for each of them, which there is a limit on how many texture objects you can have at once. hope this helps
Luna-devv commented 2024-10-20 10:26:39 +00:00 (Migrated from github.com)

Considering even Minecraft itself used a single file for all block faces up to 1.12 (I belive), the current approach should be more than fine

Considering even Minecraft itself used a single file for all block faces up to 1.12 (I belive), the current approach should be more than fine
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TheZone/ScuffedMinecraft#13
No description provided.