summaryrefslogtreecommitdiff
path: root/LUT.cs
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2026-08-05 15:11:19 -0400
committerAndrew Opalach <andrew@akon.city> 2026-08-05 15:11:19 -0400
commit077dc958fa15457356b695a050aae5be3011081c (patch)
tree2be30967579bc3c3419a324e3a10978e084f6a29 /LUT.cs
parent503dddc91f123da37f686505c8979113d2ed303f (diff)
downloadWorldTuningTool-077dc958fa15457356b695a050aae5be3011081c.tar.gz
WorldTuningTool-077dc958fa15457356b695a050aae5be3011081c.tar.bz2
WorldTuningTool-077dc958fa15457356b695a050aae5be3011081c.zip
Add Sky, Fog, and Water Waves objects
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'LUT.cs')
-rw-r--r--LUT.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/LUT.cs b/LUT.cs
index 06db8dd..a8db19d 100644
--- a/LUT.cs
+++ b/LUT.cs
@@ -102,16 +102,13 @@ namespace WorldTuningTool
for (i = 0; i < lutDataSize; i += 8)
{
Vector3 v = parsed[i / 8];
- ushort normX = (ushort)Math.Round(v.X * scale);
- ushort normY = (ushort)Math.Round(v.Y * scale);
- ushort normZ = (ushort)Math.Round(v.Z * scale);
- byte[] bytes = BitConverter.GetBytes(normX);
+ byte[] bytes = BitConverter.GetBytes((ushort)Math.Round(v.X * scale));
data[i] = bytes[0];
data[i + 1] = bytes[1];
- bytes = BitConverter.GetBytes(normY);
+ bytes = BitConverter.GetBytes((ushort)Math.Round(v.Y * scale));
data[i + 2] = bytes[0];
data[i + 3] = bytes[1];
- bytes = BitConverter.GetBytes(normZ);
+ bytes = BitConverter.GetBytes((ushort)Math.Round(v.Z * scale));
data[i + 4] = bytes[0];
data[i + 5] = bytes[1];
bytes = BitConverter.GetBytes(0x2B88); // Alpha constant.