HNHacker News
TopNewBestAskShowJobs

hrydgard

447 karma · joined January 24, 2012

submissionscomments
hrydgard··on Cracking VFPU math functions using Claude (Sony PSP)
Inspired by skmp's success with the Dreamcast's vector instructions (see https://skmp.dev/blog/sh4-fpu/), I used Claude to figure out the special function evaluation hardware of the Sony PSP's VFPU vector unit, which in all these years nobody had managed to crack.
hrydgard··on A third world engineer responds to “RISC-V: They should have known better”
More than half the article is AI slop. Sad.
hrydgard··on Converting colors in JavaScript at 6B operations per second
This is just AI slop explaining the very basics of what a pixel/fragment shader is. The usecase is not particularly useful. Doesn't belong on HN.
hrydgard··on Backtrack-Free Cursive
Got taught this one in Sweden in the early 90s. Not too surprising though, as much of the Swedish school system used to be modeled on DDR...
hrydgard··on Xbox 'OG' Adventures
Maybe a cache coherency issue, where data written by the CPU is not visible to the GPU, without some kind of explicit cache line invalidation, maybe on both sides? Caveat, I don't know much about the memory system on the XBox but this is a typical issue with homebrew code on consoles.
hrydgard··on Zig's new bitCast semantics and LLVM back end improvements
Or you just go ahead and forget that big endian ever existed. It's not coming back.
hrydgard··on No Graphics API
Well, it is what is done on several tiler architectures, and it generally works just fine. Normally your computations of the position aren't really intertwined with the computation of the other outputs, so dead code elimination does a good job.
hrydgard··on Shipping textures as PNGs is suboptimal
BC1-3 are like that, but BC7 is far, far more complex. The search space is huge.
hrydgard··on Blender is Native on Windows 11 on Arm
It works just fine and is natively ARM, since a year or so.
hrydgard··on A new PNG spec
What about implementations? libpng seems pretty dead, 1.7 has been in development forever but 1.6 is still considered the stable version. Is there a current "canonical" png C/C++ library?
hrydgard··on First Boeing 787 Dreamliner Crash
Parody account
hrydgard··on Show HN: Duolingo-style exercises but with real-world content like the news
Great stuff!

Small UX thing: Make it so you can just click a word to fill in the next empty spot, instead of having to drag, similar to when building sentences in Duolingo. Especially when not on a touchscreen, having to drag is pretty painful and reduces accessibility.

hrydgard··on FFmpeg School of Assembly Language
Function calls are very fast (unless there's really a lot of parameter copying/saving-to-stack) and if you can re-use a chunk of code from multiple places, you'll reduce pressure on the instruction cache. Inlining is not always ideal.
hrydgard··on How I failed to make a game: Raycasting on the GBA
Not sure if you care at this point, given that you stopped working on project, but there's a better way to find the ray direction for each column than using sin/cos for every one, which will also get rid of the slightly warped look:

Calculate the two vectors from the camera at the very left and right of the screen (using your fov angles and sin/cos, that's fine). Then, to find the ray direction vectors for each column, interpolate linearly between your left and right direction vectors, and possibly normalize the resulting vectors if your ray walking algorithm requires it.

This will create a perspective that integrates tightly with sprites that you 3D project the usual way, and lines will stay straight lines.

hrydgard··on UE5 Nanite in WebGPU
Pack Z and 32-bit color together into a 64-bit integer, then do an atomic min (or max with reversed Z) to effectively do a Z-query and a write really, really fast.
hrydgard··on Honey, I shrunk {fmt}: bringing binary size to 14k and ditching the C++ runtime
What else would it possibly mean?

k is very common shorthand for kB, at least historically.

hrydgard··on ESP32-S3 has a few SIMD instructions
Nice!

Could save a couple of cycles per iteration by preloading the shift amounts into several GPRs before entering the loop, instead of initializing them just before use.

hrydgard··on Eclipse: The Demo that Sold 3D to Nintendo
I think "cover shooter mechanic" refers to ducking behind cover and a system for smoothly shooting from behind it like in Gears of War - or in Winback. This mechanic was not there in Wolfenstein 3D.
hrydgard··on Cities Skylines 2 runs with 20fps on an Nvidia RTX4090
It's probably just a very good guess, since that's how it always goes.
hrydgard··on Accessible Palette: stop using HSL for color systems (2021)
oklab might be an even better alternative to LCh:

https://bottosson.github.io/posts/oklab/

hrydgard··on Dolphin Emulator Progress Report: May, June, and July 2023
Only the user mode part of the driver is replaced, the kernel interface is actually shared between the closed source and the open source driver. So it's just loaded like a DLL/.so and hooked up to the API.
hrydgard··on Vulkan Video Decoding
You can have a Vulkan driver that only exposes a video decoder queue and no raster/compute/copy queues, not a problem.
hrydgard··on My favorite C compiler flags during development
valgrind runs on your unmodified binary, it's asan that needs a separate build.
hrydgard··on Bay 12 Games has made $7M from the Steam release of Dwarf Fortress
What dropoff? The newest number is on top.

(Though yeah, there will be a dropoff for sure, it's just not visible here).

hrydgard··on Clip control on the Apple GPU
There is no good reason to flip the flag dynamically at runtime and apps just don't do that, so flushing the pipeline should be perfectly fine, even in an implementation of the clip control extension.
hrydgard··on Morrowind 20-year anniversary book
The Witcher 3 scratches that itch fairly well to tide you over, if you haven't played it, although it is a bit different.
hrydgard··on Xor swap trick and add/sub swap trick (2010)
This is old, cute, but simply slow and a really bad idea on modern hardware.
hrydgard··on Rustenstein 3D: Game programming like it's 1992
If you generate the rays the linear way instead, you don't even need any correction.

Generate two points which represent the left and right edges of the screen - you'd put them in at say 45 degrees left and right of the forward vector of the player. Then to generate the direction vector for each column of the screen, just interpolate linearly between those two points, and find the vector from the player to that intermediate point.

hrydgard··on Zombocom is a well of deep wisdom (2021)
The animation speed isn't the same for some reason but otherwise it's exactly like back in the day.
hrydgard··on War stories: how Crash Bandicoot hacked the original Playstation (2020)
The PSX CPU did not even have floating point support. It's nowhere close to a Pentium 90.
Page 1 of 5Next →