KhronosGroup / KhronosGroup/glTF

Texture transform should be referenced by the material texture

Open
#1,422 8 comments 0 reactions 0 assignees View on GitHub
needs discussion
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

see https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_texture_transform

Having the current specification, this implies, that for each texture we could potentially have a unique texture transformation matrix. This could result in - at this point of time - 5 uv coordinates.

What I do not like about this is, that a transformation matrix is calculated for each texture, even if they are using the same resulting transformation matrix. Beside the calculation overhead, obsolete uv sets need to be created.
Looking ahead - having more textures in the future - this does bloat up the final shader code.

Finally, if the usage in Unity and Three.js are carefully read, they also do not support "inifinite" texture transforms:
https://threejs.org/docs/#api/textures/Texture.offset
https://docs.unity3d.com/ScriptReference/Material-mainTextureOffset.html

Contributor guide

Open the contributing guide

Research direction

Start by reading the KHR_texture_transform extension specification linked in the issue, then compare the referenced Three.js Texture.offset and Unity Material-mainTextureOffset documentation. Determine and document whether the proposed texture/material relationship removes redundant transforms and UV sets without exceeding the behavior described by those references.

Written by the indexing model from the issue text.

Assessment

Tech stack
three.js, unity
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.