KhronosGroup / KhronosGroup/glTF
proposal: extension to declare SHA256 of images.
- Dominant language
- HTML
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 17h 26m
- Merged PRs (30d)
- 5
Description
I would like to propose an extension for images, where the extension would contain a single field: "sha256" with an hexadecimal value representing the hash of the image referenced by the image object:
The purpose is this:
In games, it is quite common to have a global texture store and share textures between models.
The solution usually suggested is to compare the full load paths, but that's not always possible if, for example the textures are archived internally, or in other cases it can happen the resources are actually duplicated and we want to avoid redundant loads.
An authoring application only needs to calculate the sha256 of every image and add the extension.
On the client side, like a game engine, it would check whether the image has been loaded using the sha256 as a dictionary key.
as a bonus, this can be used to verify the image bytes.
This may look like adding an "ID" to the images, but in this particular extension, there's no ambiguities since both the extension naming, and how to define the value of the property is clearly defined.
Contributor guide
Research direction
Start with the issue proposal and review how glTF image extensions are named and specified. Determine the extension name, the exact SHA256 input and hexadecimal representation, and how the field applies to image objects. Done requires an agreed extension design, not just an isolated code change.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100