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

gltfpack: Merge identical texture objects together #602

Merged
merged 2 commits into from
Sep 25, 2023
Merged

Commits on Sep 24, 2023

  1. gltfpack: Merge identical texture objects together

    Blender glTF exporter (and possibly others) output duplicate texture objects
    in some exports. This blocks material merging which can result in more draw
    calls than necessary, and in some loaders (such as Three.JS) may result in
    extra texture decoding during loading and extra memory spent.
    
    For simplicity we still assume that images in the source document are
    unique, but deduplicate and remove redundant texture objects now.
    
    The process is a little different from how materials are deduplicated, as
    we need to maintain remap for unused textures to avoid traversing all views
    again as they are part of a complicated material structure.
    zeux committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    24dad31 View commit details
    Browse the repository at this point in the history
  2. gltfpack: Fix textureCount report stats after texture merging

    Also include minor refactoring of mergeTextures.
    zeux committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    aa89e4f View commit details
    Browse the repository at this point in the history