frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Germany drops opposition to nuclear power in rapprochement with France

https://www.ft.com/content/e99efa2b-338a-4065-89c6-0683d5759ed7
1•chickenbig•3m ago•1 comments

What Should a 4 Year Old Know? (2010)

https://magicalchildhood.wordpress.com/2010/08/31/what-should-a-4-year-old-know/
1•Tomte•9m ago•0 comments

Welcome to Beam Wisdoms

https://beam-wisdoms.clau.se/start.html
1•Tomte•9m ago•0 comments

How to Build an Anycast Network

https://render.com/blog/how-to-build-an-anycast-network
1•reynaldi•10m ago•0 comments

Two-Time IMO Gold Medalist Becomes President of Romania

https://twitter.com/tunguz/status/1924214528188760515
1•nucatus•10m ago•0 comments

Raycasting

https://lodev.org/cgtutor/raycasting.html
2•carlos-menezes•14m ago•0 comments

Brutalist Framework: FOSS Framework for the Brutalist Web Design Style

http://brutalistframework.com
3•horsellama•18m ago•0 comments

The Golden Age of computer user groups

https://arstechnica.com/information-technology/2020/08/the-golden-age-of-computer-user-groups/
1•rbanffy•19m ago•0 comments

Emulator Debugging: Area 5150's Lake Effect

https://martypc.blogspot.com/2025/05/emulator-debugging-area-5150s-lake.html
1•rbanffy•20m ago•0 comments

Amazon rebrand by Koto Studio

https://koto.studio/work/amazon/
1•tlz•21m ago•0 comments

Winners of Nature's Scientific Photography Awards 2025

https://www.nature.com/immersive/d41586-025-01398-0/index.html
1•rmnwski•23m ago•0 comments

Show HN: Curio – Smarter briefs for first meetings

https://www.meetcurio.ai/try
1•itsteebz•23m ago•0 comments

Ask HN: Would you pay for F# + Angular and self-hosted starter kit?

1•QuantFantom•28m ago•1 comments

EvoAgentX: The First Self-Evolving AI Agent Framework

https://github.com/EvoAgentX/EvoAgentX
1•EvoAgentX•29m ago•1 comments

Seagate claims spinning disks beat SSDs on carbon footprint – Blocks and Files

https://blocksandfiles.com/2025/04/16/seagate-decarbonizing-data-report/
1•rbanffy•30m ago•0 comments

Developers spend most of their time figuring the system out

https://lepiter.io/feenk/developers-spend-most-of-their-time-figuri-7aj1ocjhe765vvlln8qqbuhto/
1•r4um•32m ago•0 comments

How to self-host Dokku on Hetzner

https://catalins.tech/selfhost-with-dokku-hetzner-cloudflare/
3•strzibny•33m ago•0 comments

Traditional and Neural Order-Independent Transparency

https://www.tobias-franke.eu/publications/tsopouridis25tnoit/index.html
1•ibobev•34m ago•0 comments

Appwrite just launched front end hosting: an open-source Vercel alternative?

3•ebenezerdon•36m ago•1 comments

The Lost Decade of Small Data?

https://duckdb.org/2025/05/19/the-lost-decade-of-small-data.html
1•andreasha•36m ago•0 comments

Oskar Kokoschka, Hermine Moos, and the Alma Mahler Doll

https://publicdomainreview.org/collection/alma-mahler-doll/
1•Goodbichon•37m ago•0 comments

Returning several values from a function in C++ (C++23 edition)

https://lemire.me/blog/2025/05/18/returning-several-values-from-a-function-in-c-c23-edition/
1•ibobev•37m ago•0 comments

Show HN: Feedback Wanted: Viper – My AI-Powered Open-Source CTI Tool

https://github.com/ozanunal0/viper
1•rtfm01•39m ago•0 comments

What did you agree to? Readable privacy policies with help from ML

https://www.soundsandwords.io//privacy-policies/
4•rdkf•42m ago•0 comments

Google releases Material 3 Expressive, a more emotional UI design system

https://m3.material.io/blog/building-with-m3-expressive
1•nativeforks•48m ago•0 comments

Development Practices Based on HarmonyOS 5 Atomic Vision Services

1•zhxwork•49m ago•1 comments

Monolith-First – are you sure?

https://www.architecture-weekly.com/p/monolith-first-are-you-sure
1•emreb•51m ago•0 comments

The Euphoria Programming Language

https://www.rapideuphoria.com/
1•zephyrfalcon•54m ago•0 comments

If Lamine Yamal Can Master Football at 17, You Can Master Your Market

https://techonda.medium.com/if-lamine-yamal-can-master-football-at-17-you-can-master-your-market-83bd9050cad8
1•bamboriz•54m ago•0 comments

What we've learned about digital gaming's climate impact – a summary (2021)

https://www.eurogamer.net/what-weve-learned-about-digital-gamings-climate-impact-a-summary
1•musha68k•58m ago•0 comments
Open in hackernews

Layers All the Way Down: The Untold Story of Shader Compilation

https://moonside.games/posts/layers-all-the-way-down/
55•birdculture•6h ago

Comments

shmerl•4h ago
> Rendering, by comparison, is a huge can of worms. Every platform has their own unique support matrix.

GPU APIs landscape is stuck in the dumb NIH mentality of the '90s because stuck up lock-in proponents refuse to support Vulkan on their walled gardens.

The only recent somewhat positive development about that was MS deciding to use SPIR-V and eventually ditch DXIL. A small step in the right direction, but not really enough yet.

alexk101•3h ago
I have been playing around with slang, which is supposed to be more cross platform. They have a neural rendering slant, and I have yet to fully test on all platforms, but I think it's a welcome move to consolidate all these apis. https://shader-slang.org/
raphlinus•3h ago
Yup, I think slang is the future. Anyone on this thread willing to fund a Rust implementation?
gmueckl•2h ago
Why? Unless you need to embed the slang transpiler (unlikely), the language it is written in literally doesn't matter.
shmerl•2h ago
I think Rust itself as a language for GPU programming is another interesting alternative:

https://github.com/Rust-GPU/rust-gpu/

raphlinus•1h ago
This is a longer and deeper conversation, but I think on topic for the original article, so I'll go into it a bit. The tl;dr is developer friction.

By all means if you're doing a game (or another app with similar build requirements), figure out a shader precompilation pipeline so you're able to compile down to the lowest portable IR for each target, and ship that in your app bundle. Slang is meant for that, and this pipeline will almost certainly contain other tools written in C++ or even without source available (DXC, the Apple shader compiler tools, etc).

There are two main use cases where we want different pieces of shaders to come from different sources of truth, and link them together downstream. One is integrating samplers for (vello_hybrid) sparse strip textures so those can be combined with user paint sources in the user's 2D or 3D app. The other is that we're trying to make the renderer more modular so we have separate libraries for color space conversion and image filters (blur etc). To get maximal performance, you don't want to write out the blur result to a full-resolution texture, but rather have a function that can sample from an intermediate result. See [1] for more context and discussion of that point.

Stitching together these separate pieces of shader is a major potential source of developer friction. There is a happy path in the Rust ecosystem, albeit with some compromises, which is to fully embrace WGSL as the source of truth. The pieces can be combined with string-pasting, though we're looking at WESL as a more systematic approach. With WGSL, you can either do all your shader compilation at runtime (using wgpu for native), or do a build.rs script invoking naga to precompile. See [2] for the main PR that implements the latter in vello_hybrid. In the former case, you can even have hot reloading of shaders; implemented in Vello main but not (yet) vello_hybrid.

To get the same quality of developer experience with Slang, you'd need an implementation in Rust. I think this would be a good thing for Slang.

I've consistently underestimated the importance of developer friction in the past. As a contrast, we're also doing a CPU-only version of Vello now, and it's absolutely night and day, both for development velocity and attracting users. I think it's possible the GPU world gets better, but at the moment it's quite painful. I personally believe doing a Rust implementation of the Slang compiler would be an important step in the right direction, and is worth funding. Whether the rest of the world agrees with me, we'll see.

[1]: https://xi.zulipchat.com/#narrow/channel/197075-vello/topic/...

[2]: https://github.com/linebender/vello/pull/1011

flohofwoe•40m ago
AFAIK a very large part of Slang are massively big 3rd party libraries written in C++, the Rust code would just be a very thin layer on top of millions(?) of lines of C++ code that has been grown over decades and is maintained elsewhere.

(fwiw I've been considering to write the custom parts of the sokol shader compiler in Zig instead of C++, but that's just a couple of thousand lines of glue code on top of massive C++ libraries (SPIRVTools, SPIRVCross, glslang and Tint), and are terrible to work with from non-C++ languages.

As far as developer friction for integration into asset workflows goes, that's exactly where I would prefer Zig over Rust (but a simple build.zig already goes most of the way without porting any code to Zig).

socalgal2•1h ago
https://compute.toys/view/1948 recently added Slang support
socalgal2•1h ago
Vulkan is by far the worst API of all the modern graphics API. It's crap. It's also not even trying to be portable, expecting you to query a million things and then adapt to the platform.

I for one am glad Vulkan is not "it"

Also, it's not even portable on Windows. Sure, if you're making a game, you can expect your gamer audiences have it installed. If you're making an app and you expect businesses to use you it you'll find neither OpenGL nor Vulkan work on most business class machines view Remote Desktop. The point being, it's not portable by design nor in actuality

flohofwoe•45m ago
I would agree if Vulkan would be a good 3D API, but it turned out to be the worst of the modern 3D APIs because it repeats the same main mistake as GL:

There is no design vision, instead it's a cobbled together mess of adhoc vendor extensions that are eventually promoted to 'core'.

raphlinus•4h ago
We tried something like this with piet-gpu-hal. One problem is that spirv-cross is lossy, though gaps in target language support are getting better. For example, a device scoped barrier is just dropped on the floor before Metal 3.2. Atomics are also a source of friction.

But the main problem is not the shader language itself, but the binding model. It's a pretty big mess, and things change as you go in the direction of bindless (descriptor indexing). There are a few approaches to this, certainly reinventing WebGPU is one. Another intriguing approach is blade[1] by Dzmitry Malyshau.

I wish the authors well, but this is a hard road, especially if the goal is to enable more advanced features including compute.

[1]: https://github.com/kvark/blade

pjmlp•4h ago
As expected, they don't touch the issue of how shaders work in PlayStation (LibGNM, LibGNMX) and Switch (NVN).
gmueckl•2h ago
These systems are highly proprietary and Inam reasonably certain that stating anything about them publicly would break some NDAs.
pjmlp•1h ago
As someone still having an Nintendo Developer Portal account, holding SCEE content back when the London Soho office used to have a developer site (aka Team Soho), and PS2Linux owner, there is plenty of material that can be discussed publicly without breaking NDAs.
flohofwoe•27m ago
Console specific information also is not all that interesting anymore these days since game consoles have switched to off-the-shelf GPU designs with only minor modifications.
pjmlp•8m ago
Yeah, but they still use their own proprietary APIs.
genocidicbunny•40m ago
I really do wish that Sony made even more info about GNM and GNMX public. I was only starting to learn it when I got laid off and lost my access. I may or may not still have some older docs that found their way into my box as I was leaving on the last day, but if any did, they're definitely incomplete. I spent most of my time working on non-graphics parts of the project, so my time that I got to spend on digging into graphics system of the PS5 was pretty limited.
riggsdk•3h ago
BGFX (https://github.com/bkaradzic/bgfx) uses a different approach. You basically write your shader in a GLSL-like language but it's all just (either very clever or very horrible) macro expansions that handles all the platform differences. With that you get a very performant backend for OpenGL, WebGL, Vulkan, Metal, Direct3D 11 and 12 and Playstation. It's shader compiler program basically does minimal source level transformations before handing it over to the platforms' own shader compiler if available.
mvdtnz•3h ago
This is a very interesting article, it was fun to learn what shaders are and why I have to wait for them to compile every time I play Call of Duty.

What I'd like to know is why game developers can't provide a service / daemon that will perform shader compilation when shaders or drivers change so I don't need to waste 25 minutes of my precious gaming time when I load CoD and see they need compiling. My computer has been sitting there unused all week. Steam was smart enough to download game updates in that time, why isn't your game smart enough to recompile my shaders on an idle machine?

gmueckl•2h ago
Imagine the outcry if every game came with a background process that just sits there in the background.

Also - and this may sound a little bonkers - some renderers are so complex and flexible that the actual set of required shaders is only discovered when it tries to render a frame and the full set of possible shader configuration permutations is so large that compiling them all in advance is pointless or borderline infeasible.

mvdtnz•2h ago
Lots of games come with background processes.
Negitivefrags•2h ago
Steam actually shares compiled shaders between users with the same hardware / driver version, but only for Vulkan I believe.
flohofwoe•14m ago
A better approach is to drastically reduce the number of individual shaders. Having tens of thousands of shader variants is an unfortunate side effect of treating shaders as asset data, and building them with visual noodle-graph tools by artists. No game actually needs tens of thousands of shaders.
voidUpdate•1h ago
If you need to compile shaders at runtime, then why do I have to wait 10 mins for unreal to compile 30,000 shaders whenever it feels like it?
flohofwoe•52m ago
Because the input bytecode blobs that are passed into 3d APIs are only a gpu-vendor- and render-pipeline-agnostic bytecode format (eg SPIRV or DXBC) - this is not what's actually running on the GPU. There's a second compile step happening inside the driver which compiles into a proprietary "machine code" format, and specialized for a specific pipeline object. Normally that driver internal compile step is quite fast, but that doesn't matter if there's tens of thousands of shader variants.