Skip to content

Commit

Permalink
implement khr_texture_transform in unity
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Kaile committed Dec 6, 2023
1 parent 5c53765 commit d08e06f
Show file tree
Hide file tree
Showing 9 changed files with 1,622 additions and 26 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### ? - ?

##### Additions :tada:

- Improved `KHR_texture_transform` extension by moving it from native to Unity. This makes the texture transformations more efficient and reliable. The shader now handles the scale and offset values.

### v1.6.4 - 2023-10-26

##### Additions :tada:
Expand Down
2 changes: 2 additions & 0 deletions Runtime/ConfigureReinterop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ public void ExposeToCPP()
meshRenderer.material.DisableKeyword("keywordName");
meshRenderer.material.EnableKeyword("keywordName");
meshRenderer.material.GetTexture(id);
meshRenderer.material.SetTextureOffset(id, new Vector2());
meshRenderer.material.SetTextureScale(id, new Vector2());
var ids = new List<int>();
meshRenderer.material.GetTexturePropertyNameIDs(ids);
for (int i = 0; i < ids.Count; ++i)
Expand Down
Loading

0 comments on commit d08e06f

Please sign in to comment.