The Angle You Never Needed

There’s a pattern I’ve seen in 3D engine code many times. You have a forward direction vector and a vector pointing toward some target. You need to know if the target falls inside a field-of-view cone. So you write something like this: float angle = acos(dot(normalize(forward), normalize(to_target))); if (angle < fov_half_angle) { // target is visible } It looks reasonable. It produces correct results. But it’s doing a round trip through a representation that adds nothing and takes something away: it converts the dot product into an angle, then immediately compares that angle against a threshold. If you understood what the dot product actually encodes, you’d skip the middle step entirely. ...

March 14, 2026 · PixVerse Staff

The Code That Draws Itself

There’s a technique from the early days of game programming that I keep coming back to. It sounds wrong the first time you hear it. The idea is that the fastest way to draw a sprite isn’t to read its pixels and copy them to the screen. It’s to compile the sprite into machine code and then run it. The sprite doesn’t get drawn. The sprite does the drawing. That’s compiled sprites. And understanding why they worked requires understanding exactly what makes regular sprite drawing slow. ...

March 4, 2026 · PixVerse Staff