diff options
author | makamys <makamys@outlook.com> | 2022-06-23 13:48:34 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-23 13:48:58 +0200 |
commit | 99e641b182c2dcaf067e61fc1193208086e8a98b (patch) | |
tree | 3676fda1cf7b53c972c8e12065df59a3ea76ef38 /src/main/java/makamys/neodymium/renderer/MeshQuad.java | |
parent | 7528004ec23e424d89ad20596a3705462d208e38 (diff) | |
download | Neodymium-99e641b182c2dcaf067e61fc1193208086e8a98b.tar.gz Neodymium-99e641b182c2dcaf067e61fc1193208086e8a98b.tar.bz2 Neodymium-99e641b182c2dcaf067e61fc1193208086e8a98b.zip |
Make short UV even more accurate by rounding it
Previously the difference was extreme in GTNH, now it's only noticable
if you're looking for it.
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/MeshQuad.java')
-rw-r--r-- | src/main/java/makamys/neodymium/renderer/MeshQuad.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/MeshQuad.java b/src/main/java/makamys/neodymium/renderer/MeshQuad.java index db8bd25..1d2c196 100644 --- a/src/main/java/makamys/neodymium/renderer/MeshQuad.java +++ b/src/main/java/makamys/neodymium/renderer/MeshQuad.java @@ -167,8 +167,8 @@ public class MeshQuad { float v = vs[vi]; if(Config.shortUV) { - out.writeShort((short)(u * 32768)); - out.writeShort((short)(v * 32768)); + out.writeShort((short)(Math.round(u * 32768f))); + out.writeShort((short)(Math.round(v * 32768f))); } else { out.writeFloat(u); out.writeFloat(v); |