Adam Sawicki

asawicki.info · Personal blog · on HN since 2013

Adam Sawicki is a graphics programmer who writes on GPUs, DirectX 12, floating-point numbers and game physics.

What HN saysHN links his floating-point myths post when discussing numeric differences across GPUs and CPUs, and his data-oriented design links for game development.
15HN people shared it
3linked it in comments
43stories submitted
438story points
5 months agolast shared
2013people per year2026

Most-shared posts

  1. 1
    Car Physics for Games (2003)
    4 people · 94 points · first shared 2013 · 13 comments on HN
  2. 2
    Myths About Floating-Point Numbers (2021)
    3 people · 67 points · first shared 2021 · 91 comments on HN
  3. 3
    Hello World Under the Microscope
    2 people · 95 points · first shared 2022 · 14 comments on HN
  4. 4
  5. 5
    State of GPU Hardware (End of Year 2025)
    2 people · 6 points · first shared 2025 · discussion on HN
  6. 6
    FP8 data type – all values in a table
    2 people · 4 points · first shared 2024 · discussion on HN
  7. 7
    Bezier Curve as Easing Function in C++
    1 people · 58 points · first shared 2025 · 6 comments on HN
  8. 8
    All Sources of DirectX 12 Documentation
    1 people · 34 points · first shared 2025 · 18 comments on HN
  9. 9
    Calculating the Bounding Rectangle of a Circular Sector
    1 people · 30 points · first shared 2025 · 1 comments on HN
  10. 10
  11. 11
    How Do Graphics Cards Execute Vector Instructions?
    1 people · 4 points · first shared 2020 · discussion on HN
  12. 12
  13. 13
    I Fixed My App Taking 5 Minutes to Start
    1 people · 3 points · first shared 2025 · discussion on HN
  14. 14
    The Secrets of Floating-Point Numbers
    1 people · 3 points · first shared 2025 · discussion on HN
  15. 15

What HN people wrote when they linked it

raphlinus · 2022-02-15
Lots of problems with this (https://xkcd.com/386/). "All shader languages are very similar to C". Even counting only mainstream shader languages, MSL is explicitly based on C++ and not C. There is a big difference. The non-mainstream shader languages will also be increasingly important, because who wants to be restricted to C dialects? "and have all the usual features associated with C save for pointers." MSL has strong built-in support for pointers. In addition, the future of Vulkan is increasingly pointer-friendly. HLSL compilation. This oversimplifies the story a bit. DXC only produces DXIL which is D3D12+ (and SPIR-V, so it can be used on Vulkan with little hassle). Older dialects (shader model 5) work on D3D11 as well, and can also be compiled offline, but that requires FXC [1] (FXC output, DXBC, can be used in D3D12, you just don't get as much access to newer features). "Some languages however encourage you not to compile shaders to an IR such as GLSL with OpenGL". This is no longer true as of OpenGL 4.6, which can use SPIR-V. On the other hand, it's probably best to think of OpenGL as a nearly obsolete API, only useful for compatibility. "The metallib compiler is available in the command line in any recent MacOS installation." It might also be worth pointing out that it is also now available on Windows. Thus, on a single Windows box it is possible to go from your source language to all major shader IL's. "GLSLang even supports compiling HLSL to SPIR-V, though…
yencabulator · 2023-10-25
That's probably more about GPUs cheating to be faster[1]. https://asawicki.info/news_1741_myths_about_floating-point_numbers [1]: Back in the day, CPU results could also vary based on path of execution; see tweet in article.
Impossible · 2014-12-02
Game developers have been big on data oriented design (http://www.asawicki.info/news_1422_data-oriented_design_-_links_and_th… in recent years. It's funny, because data-oriented design examples tend to look like the original ("bad"?) array of values example in the blog post. Most of articles on DOD focus on performance, which seems of least concern to most software engineers, but I think it helps with understanding how your data is transformed and results in easier to understand code. I don't see how OOP is any more applicable to games than it is to other software. In a typical business or social CRUD app you can represent things in the same way you could in an OOP game. "Hero" becomes "User", "Monster" becomes "Friend", "Inventory" becomes "Account", etc. Otherwise I strongly agree with you. I think all software should be written in a more functional or data-oriented style. The biggest reason I'd write OOP code now is that many game designers and programmers, and most popular game engines and frameworks, prefer OOP.

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