Nathan Reed

reedbeta.com · Personal blog · on HN since 2013

Nathan Reed writes about computer graphics, GPU programming, texture compression, hashing, and Unicode.

What HN saysHN links it for GPU hash functions, quadrilateral interpolation, and Unicode; a commenter also includes him in a list of blogs worth reading.
23HN people shared it
11linked it in comments
20stories submitted
624story points
9 months agolast shared
2013people per year2026

Most-shared posts

  1. 1
    Hash Functions for GPU Rendering
    3 people · 43 points · first shared 2021 · 8 comments on HN
  2. 2
    Understanding BCn Texture Compression Formats (2012)
    3 people · 1 points · first shared 2018 · discussion on HN
  3. 3
    A Programmer’s Introduction to Unicode
    2 people · 299 points · first shared 2017 · 60 comments on HN
  4. 4
    Depth Precision Visualized
    2 people · 33 points · first shared 2015 · 1 comments on HN
  5. 5
    Quick and easy GPU random numbers
    2 people · 3 points · first shared 2026 · discussion on HN
  6. 6
    Quadrilateral interpolation part 2
    2 people · first shared 2017
  7. 7
    Antialiasing: To Splat or Not
    1 people · 79 points · first shared 2014 · 9 comments on HN
  8. 8
    Data-Oriented Hash Table
    1 people · 76 points · first shared 2015 · 9 comments on HN
  9. 9
    Making Your Own Container Compatible with C++20 Ranges
    1 people · 74 points · first shared 2021 · 10 comments on HN
  10. 10
    Why Do Quaternions Double-Cover?
    1 people · 5 points · first shared 2025 · discussion on HN
  11. 11
    Mesh Shader Possibilities
    1 people · 2 points · first shared 2018 · discussion on HN
  12. 12
    The Shunting-Yard Algorithm (2011)
    1 people · 2 points · first shared 2023 · discussion on HN
  13. 13
    Python-Like enumerate() in C++17
    1 people · 2 points · first shared 2018 · discussion on HN
  14. 14
    Data-Oriented Hash Table
    1 people · 1 points · first shared 2023 · discussion on HN
  15. 15

What HN people wrote when they linked it

mattnewport · 2018-06-11
There are some efforts underway to standardize using SIMD but this is really a separate problem to providing a short vector math library suitable for the kind of linear algebra useful for 3D graphics and physics. Making your vec4f type a SIMD register type is not a good way to make use of SIMD hardware. The best approach is generally an SoA (Struct of Arrays) rather than an AoS (Array of Structs) and the best CPU programming model for that is something like ispc[1]. Nathan Reed has a good summary of why "naïve" SIMD libraries after not the way to go for short vector math: http://www.reedbeta.com/blog/on-vector-math-libraries/#how-to-simd-and… On some platforms alignment issues become a big problem for naïve vector math libraries too, though this is less of an issue on current generation x64 hardware. [1] https://ispc.github.io/ispc.html
ino · 2017-09-07
Recently I came across http://iquilezles.org/www/articles/ibilinear/ibilinear.htm when researching how to draw textured non-parallelogram quadrilaterals, without affine texture mapping, with WebGL / OpenGL ES 2. I was disappointed to learn that OpenGL wouldn't do it and we have to calculate it on our own and send in a 3rd texture coordinate to each vertex for extra calculation on the shader. Sadly, there isn't much useful info on this subject on the internet (I'm not talking about projective mapping, but bilinear interpolation). I've found this: http://www.reedbeta.com/blog/quadrilateral-interpolation-part-2/ that I think will work for my case. My problem is that I also use normals to do "fake" parallel lighting on quads and it accentuates even more the affine errors on non parallelogram quadrilaterals. It's easier to just subdivide the quad to minimize the affine artifacts. If anyone knows a better way to solve it, I'd love to learn.
masklinn · 2017-03-09
> Unicode is fucked. All these bullshit emojis Ah yes, all those bloody emoji taking the place of better worthier characters, those dastardly pictures taking up all of one half of one 16th of one Unicode plane (which has only 16 of those, and only 14 public). And the gall they have, actually being used and lighting up their section of plane 1 like a christmas tree while the rest of the plane lies in the darkness: http://reedbeta.com/blog/programmers-intro-to-unicode/heatmap-wiki+twe… what a disgrace, not only existing but being found useful, what has the world come to. And then of course there's the technical side of things: emoji actually forced western developers — and especially anglo ones — to stop fucking up non-ASCII let alone non-BMP codepoints. I don't think it's a coincidence that MySQL finally added support for astral characters once emoji started getting prominent. In fact, I have a pet theory that the rash of combining emoji in the latest revisions is in part a vehicle to teach developers to finally stop fucking up text segmentation and stop assuming every codepoint is a grapheme cluster.
Atrix256 · 2023-09-07
Here's the source. Nathan Reed references a jcgt paper, which references a paper form 2012. https://www.reedbeta.com/blog/hash-functions-for-gpu-rendering/
corysama · 2023-04-21
https://www.reedbeta.com/blog/understanding-bcn-texture-compression-fo… BC1-5 have been standard practice since before the original XBox. I think when people here are talking about "uncompressed assets" they mean "not applying variable-rate zip style compression on top of BCn compression."
rasz · 2020-06-24
It has been said PS5 uses Kraken. If its this http://www.radgametools.com/oodlekraken.htm then nothing really changes. PS4 games use RAD Kraken today. Texture assets themselves have standardized long time ago, currently on the desktop we are at http://www.reedbeta.com/blog/understanding-bcn-texture-compression-for… with history going all the way back to 1990 patents for Apple Video 'road pizza' codec, later ripped off by S3 and re-patented as S3TC texture compression in 1997.
CountHackulus · 2013-04-12
This is probably the simplest article about the subject: http://www.reedbeta.com/blog/2013/01/12/quick-and-easy-gpu-random-numb…
Frotag · 2026-01-31
> Quaternions are the same idea just in 3 dimensions (so with 3 imaginary units i j k, not just i, one per plane). I justify quaternions to myself with the intuition from [1]. In essence quaternions represent rotations in 4D, where multiplying by a "unit" (i,j,k), rotates two distinct planes by 90 degrees. The reason introducing a single unit j doesn't work is the same reason this rotation-is-multiplication trick doesn't work in 1D (or really any odd-number of dimensions). Anyways if we call this 4th axis w and pick a simple rule like ij = k then we get some nice properties like - multiplying by i rotates xy + zw planes by 90 degrees - j rotates xz + yw - k rotates xw + yz - 1 rotates nothing Notably this definition covers all 6 unique planes. But if we want to rotate only a single plane, we have to make up a new property, something that lets us rotate say xz by 90 and yw by -90. So we make up another rule that multiplying by a unit on the right does this, which algebraically looks like ij = -ji. This is incidentally why the rotation formulas have 1/2 everywhere, because if we want to rotate xy by 90, we multiply on the left by i/2 then on the right by -i/2. [1] https://www.reedbeta.com/blog/why-quaternions-double-cover/
Jasper_ · 2018-10-28
The DS "GPU" is indeed very bizarre and shares more in common with the GBA 2D rasterizer than a modern 3D GPU architecture. That it's a scanline renderer that can handle quads directly should be a pretty big tell :) I implemented a cheap subset of it used in Super Mario 64 DS for my online model viewer ( https://noclip.website/#sm64ds/44;-517.89,899.85,1300.08,0.37,-0.34,0.… ), but implementing all of the quirks and the weird featuresets might be nearly impossible to do in a modern graphics API. 2D rasterizers don't have to be slow (as SwiftShader and ryg show), and you can get the bizarre conditions exactly correct. I'm not sure what a GPU-based implementation would even add. EDIT: The math to be able to handle the bilinear quad interpolation on a GPU was worked out by reedbeta last year: http://reedbeta.com/blog/quadrilateral-interpolation-part-2/ . That's a big roadblock gone, but there's still a lot of other questionable things.

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close