From bda3fd3b37c4409fdfbd7cda12477b2c60257e87 Mon Sep 17 00:00:00 2001 From: DomNomNomVR <108088541+DomNomNomVR@users.noreply.github.com> Date: Mon, 24 Feb 2025 21:33:13 +1300 Subject: [PATCH] reverse bit order to little endian --- Assets/RT3script.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/RT3script.cs b/Assets/RT3script.cs index b5d5bb2..a5be1d8 100644 --- a/Assets/RT3script.cs +++ b/Assets/RT3script.cs @@ -107,7 +107,8 @@ public class RT3script : MonoBehaviour uint floatbits = FloatToIntBits(tr[1,1]); for (int j = 0; j < 32; j++) { //this logic does a bitwise check on the length value at bit j - if (((floatbits >> j) & 1)==1) { + // use little-endian (ends with least significant bit on the right) + if (((floatbits >> ((31)-j)) & 1)==1) { encodedTransform[j] = Color.white; } else {