From af3a602b3aea548fca96e5fb64abde1da0da9592 Mon Sep 17 00:00:00 2001 From: Andreas Atteneder Date: Tue, 30 Aug 2022 10:06:24 +0200 Subject: [PATCH] fix: Incorrect texture transform calculation when using rotation (fixes #413) --- ChangeLog.md | 1 + Runtime/Scripts/Material/MaterialGenerator.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.md b/ChangeLog.md index a33e99ae..b705c580 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Fixed - (Export) Meshes with point topology are exported correctly now (#434) +- Incorrect texture transform calculation when using rotation (#413) ## [4.8.4] - 2022-08-26 ### Changed diff --git a/Runtime/Scripts/Material/MaterialGenerator.cs b/Runtime/Scripts/Material/MaterialGenerator.cs index 4b668f6b..eb4c3e24 100644 --- a/Runtime/Scripts/Material/MaterialGenerator.cs +++ b/Runtime/Scripts/Material/MaterialGenerator.cs @@ -233,7 +233,7 @@ void TrySetTextureTransform( material.SetVector(rotationPropertyId, Vector4.zero); } - textureST.w -= textureST.y * cos; // move offset to move flip axis point (vertically) + textureST.w -= textureST.y; // move offset to move flip axis point (vertically) } if(texCoord!=0) {