Browsed by
Category: Technical

Stay near the origin kids

Stay near the origin kids

Most GPUs use the IEEE 754 single-precision floating-point format, known as FP32. The thing about using fixed representation for floating point values is that sacrifices have to be made. As you get further from 0.0, floating point gets less and less precise until…well these things happen.

Here’s what happens when you start translating objects far away from (0.0, 0.0, 0.0). After about 1km, things start getting imprecise enough to notice.

Here’s a good explanation.

Geolocating people by audio clips

Geolocating people by audio clips

It’s long been known that people trying to remain anonymous have been betrayed by the silent hum of the electrical grid that gets unintentionally recorded in your audio and video clips. But now, there’s an even new one. You can be betrayed by planes going by – even if they are pretty much inaudible to you. The sound even travels through walls.

colsto shows us how anyone can isolate the sound of planes you have inaudibly recorded in your voice or video clips can reveal your location. He uses a filter to isolate the doppler curve of planes, uses open data sources to get flight paths and flight data, then examines the doppler curves of the plane passing to reconstruct enough of the plane’s probable path near you to find matches. And it’s shockingly accurate.

Even more frightening – you usually cannot even hear the planes in the recordings. Poor quality cell phone mics and data compression, running high pass and other filters usually doesn’t remove them either.

Bodycam audio

Bodycam audio

I’ve written about this crazy game in development before, but their developer videos are really stepping things up a notch in realism.

Most games try to make guns sound cinematic by bringing big bass, big punch, and a big Hollywood explosion. But real guns don’t feel cinematic. They feel dangerous because in real life a gunshot isn’t just a sound but a shockwave. The first time you hear a real weapon fired near you, it’s usually terrifying.

In asking what modern games are missing, these guys made some great analysis of real gunshots and have made some interesting progress in their own version of environmental sound mapping that seeks to simulate interaction with the environment. Sound Rendering has been researched for over a decade, but there wasn’t really the compute to pull it off in modern games that were mostly focused on visuals.

This is still largely the case, but we’re starting to have more and more compute overhead – and I love how they’re not just following the crowd but trying to ask how to make something even better.

Their solution seems to have a good balance of simulating physical reality with real-time compute tradeoffs. Still – it’s great seeing people pushing the ball forward when too many games just end up playing like Call of Duty.

Microsoft’s new UI – WinUI3

Microsoft’s new UI – WinUI3

WinUI 3 is the recommended native UI framework for building new Windows desktop applications. It brings the Fluent Design System, high-performance rendering, and a powerful XAML-based programming model to both C# and C++ developers.

Delivered as part of the Windows App SDK, WinUI enables you to create modern, polished, and responsive desktop experiences that run on Windows 10, version 1809 (build 17763) and later, including Windows 11.

That’s the promise anyway. You can program in .NET (C#) or C++ with XAML markup to build apps that run across x86, x64, and ARM devices.

While I applaud the effort, one has to wonder the logic. OS lockin to Windows is largely a thing of the past with most apps being web-based. Almost no company wants single-platform solutions. The cases that need a truly native application are very limited – things like games (which don’t need native UIs), and performance/productivity tools that directly access hardware. I worked on one such app for many years, but those kinds of apps are growing fewer and farther between.

What would be more amazing is if such a framework could also sit as a shim under old Win32 and older native/.NET apps and automatically update them to the new look and feel as well as provide this new UI interface. I realize that may not be possible without breaking lots of apps, but it could be amazing for those apps it does work for. Maybe something for Microsoft to think about…

Byzantine Generals Problem

Byzantine Generals Problem

Fun CS problem: Byzantine General’s Problem also called the interactive consistency problem.

The Byzantine general’s problem considers a number of generals who are attacking a fortress. The generals must decide as a group whether to attack or retreat; some may prefer to attack, while others prefer to retreat. The important thing is that all generals agree on a common decision, for a half-hearted attack by a few generals would become a rout, and would be worse than either a coordinated attack or a coordinated retreat. The problem is complicated further by the generals being physically separated and having to send their votes via messengers who may fail to deliver votes or may forge false votes.

Windows Sandbox with GPU acceleration

Windows Sandbox with GPU acceleration

Windows Sandbox is a great way to make a very quick Windows sandbox separated from the rest of your system if you want to run programs you might not fully trust but not set up a full VM or Docker container.

Using a GPU with the sandbox is easy, but requires you create a text file and put the following code in it. When done, save the text file as a *.wsb file and then click it so that config is used when running the sandbox.

<Configuration>
<vGpu>Enable</vGpu>
</Configuration>