• 19 Posts
  • 376 Comments
Joined 1 year ago
cake
Cake day: June 10th, 2023

help-circle





  • I believe the optimization came because the denominator was a power of two. In my memory, the function counted up all of the bytes being sent and checked to see that the sum was a power of 16 (I think 16 bytes made a single USB endpoint or something; I still don’t fully understand USB).

    For starters, you can split up a larger modulo into smaller ones:

    X = (A + B); X % n = (A % n + B % n) % n

    So our 16 bit number X can be split into an upper and lower byte:

    X = (X & 0xFF) + (X >> 8)

    so

    X % 16 = ((X & 0xFF) % 16 + (X >>8) % 16) % 16

    This is probably what the compiler was doing in the background anyway, but the real magic came from this neat trick:

    x % 2^n = x & (2^n - 1).

    so

    x % 16 = x & 15

    So a 16 bit modulo just became three bitwise ANDs.

    Edit: and before anybody thinks I’m good a math, I’m pretty sure I found a forum post where someone was solving exactly my problem, and I just copy/pasted it in.

    Edit2: I’m pretty sure I left it here, but I think you can further optimize by just ignoring the upper byte entirely. Again, only because 16 is a power of 2 and works nicely with bitwise arithmatic.











  • If you are really super deep into the ecosystem and the AR pass through is that good, then I can see it working. On Oculus, I often find myself peering through the gap by my nose to see whatever notification or whatnot on my phone. Apple Vision can fix that.

    Though you still have to contend with the comfort factor. It’s a lot to wear on your face when you’re supposed to be casually enjoying content for hours at a time. Heaven forbid you care about how your hair looks.





  • Issue is that if I remember correctly the vive was an outside-in concept that required base stations to be setup

    But that wasn’t the complaint levied. They were literally complaining about needing to walk around.

    And for many of that it is just fine to sit on a couch and still have a benefit from the technology.

    But everyone knows the people watching at home on traditional 2D TV get the best view. Zooms on the players/performers, slow-mo recap, etc. I can’t imagine the nausea of having your entire field of view warped across the court to see every special angle. Not to mention, until whatever VR app has a plug in for every thing you’d want to do on your phone while you’re watching the game, you’re stuck paying 100% of your attention to the sport.

    Hell, even the people at the concert or sporting event spend half their time on their phone.


  • When the HTC Vive and Oculus Rift first came out, the rift didn’t yet have full-room support. You had to sit facing the base station and use a video game controller. Meanwhile, on Vive, you could stand up, walk around, and manipulate the world with two tracked remotes.

    One pro-con comparison I read at the time actually listed needing to walk around the room as a con against HTC. That is the whole point of VR.

    I think the core issue is that every piece of new technology so far has helped us get lazier. People used to walk around an office, then they sat at a computer, now they carry their computer with them and do things from the couch.

    Nobody wants to get up to do things if they can avoid it, and that’s the only real benefit VR/AR provides.