Incorporate samplers from GLTF data into textures #28
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.
Context
This PR addresses two broad points:
Bonus!
It appears that the changes here also close #12!
Background
Colour spaces are a complicated rabbit hole, for this PR just being aware that the same image data can be interpreted in two different ways by textures in Vulkan (sRGB vs linear) is sufficient.
Textures were being created on demand because there's no direct way to know whether one should be in sRGB or linear format: this decision was deferred all the way to a
Material
requesting a texture of the corresponding format at render time. This PR uses the GLTF material spec to encode the desired colour space of each texture in the returned GLTF scene data, which is then used byScene
to create corresponding textures right after parsing that data.Changes
ColourSpace
decisions.TextureProvider
.Id<Camera>
if attached toNode
being added.TestMaterial
toLitMaterial
.Close #16