frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

ASM Shader Toy

https://wegfawefgawefg.github.io/asm-shader-toy/
27•wegfawefgawefg•4d ago

Comments

wegfawefgawefg•4d ago
My bud was learning assembly but the normal material was pretty boring but I know he wanted to learn shaders so I combined the two into something pretty terrible. It has all the same complexity of normal raymarching, sdf defining, space coordinate warping, except now you dont get variables or functions.

At first it was just a cpp demo with vm that run per pixel. That was slow, but threading it made it plenty fast for whatever peak compute you might need for a shader written in asm. Then added inputs to match shader toy, buffers for feedback and memory, and various inputs, mouse, kb, mic, webcam, etc. After that i looked over the examples and... found them pretty bland. The asm was missing things needed to make it more of an asm and less of a riscv'ish LHA form. So we add features: registers, labels, branches, subr, includes, consts, etc.

Theres a clever two eval pass for consts that is inspired by lisp, where the consts are just the same asm but with a different env. I did it like that because I looked at real asm const DSL's and they look impure to me and violate the intention of the project. Its sort of like comptime if you know what that is and dont know lisp. (What are you retarded?)

I know asm's have lots of funny macro ideas that can make them like pseudo real languages, but I just left that out because at that point why not write a little scheme that targets this "ST-ASM" as an IR, and then a tabbed pseudo python with swizzling that lowers to that. Ill probably do that next for fun.

To share it it had to be on web, and cpu vm per pixel wasnt gonna cut it in js. So the browser version now compiles the assembly to WGSL for WebGPU, with a WebGL2 fallback so Firefox can still run it. (Took longer to get that working than the entire rest of the project, but if it cant run on the top browsers then it can't be shown off...)

dvt•55m ago
Super cool shader toy! Semi-related, but my favorite demo ever (a tiny 64k Heaven Seven[1]) was fully coded in extremely esoteric assembly and used all kinds of mind-blowing tricks. There's a blog post written about it somewhere by a few Exceed members; real-time raytracing on a CPU in 2000 still blows my mind.

[1] https://www.youtube.com/watch?v=-Qw5bavWxBs

Running local models is good now

https://vickiboykis.com/2026/06/15/running-local-models-is-good-now/
845•jfb•7h ago•357 comments

GrapheneOS has been ported to Android 17 and official releases are coming soon

https://discuss.grapheneos.org/d/36469-grapheneos-has-been-ported-to-android-17-and-official-rele...
80•Cider9986•1h ago•19 comments

SpaceX to buy Cursor for $60B

https://www.reuters.com/legal/transactional/spacex-buy-anysphere-60-billion-2026-06-16/
754•itsmarcelg•11h ago•1161 comments

GPT‑NL: a sovereign language model for the Netherlands

https://www.tno.nl/en/digital/artificial-intelligence/gpt-nl/
101•root-parent•4h ago•80 comments

TIL: You can make HTTP requests without curl using Bash /dev/TCP

https://mareksuppa.com/til/bash-dev-tcp-http-without-curl/
185•mrshu•5h ago•104 comments

Calvin and Hobbes and the price of integrity

https://therepublicofletters.substack.com/p/calvin-and-hobbes-and-the-price-of
170•pseudolus•6h ago•61 comments

Mechanical Watch (2022)

https://ciechanow.ski/mechanical-watch/
587•razin•10h ago•112 comments

Stop Using JWTs

https://gist.github.com/samsch/0d1f3d3b4745d778f78b230cf6061452
149•dzonga•5h ago•90 comments

Total Iran Economic Damage Estimate

https://www.fdd.org/analysis/2026/04/23/total-iran-economic-damage-estimate/
13•littlexsparkee•45m ago•8 comments

Apple is about to make Hide My Email useless

https://arseniyshestakov.com/2026/06/16/apple-is-about-to-make-hide-my-email-useless/
278•SXX•3h ago•157 comments

But yak shaving is fun (2019)

https://parksb.github.io/en/article/32.html
171•parksb•7h ago•46 comments

Frood, an Alpine Initramfs NAS (2024)

https://words.filippo.io/frood/
18•ethanpil•1h ago•8 comments

ASM Shader Toy

https://wegfawefgawefg.github.io/asm-shader-toy/
27•wegfawefgawefg•4d ago•2 comments

Has AI already killed self-help nonfiction books?

https://tim.blog/2026/06/12/has-ai-already-killed-nonfiction/
79•imakwana•4h ago•91 comments

10Gb/s Ethernet: switching to a Broadcom SFP+ module

https://www.gilesthomas.com/2026/06/10g-ethernet-switching-to-broadcom-sfp-plus
63•gpjt•4h ago•51 comments

Apple's weird anti-nausea dots cured my car sickness

https://www.theverge.com/tech/942854/apple-vehicle-motion-cues-review-really-work
443•neilfrndes•5h ago•137 comments

Formal Methods and the Future of Programming

https://blog.janestreet.com/formal-methods-at-jane-street-index/
64•nextos•4d ago•1 comments

Correlated randomness in Slay the Spire 2

https://tck.mn/blog/correlated-randomness-sts2/
257•rdmuser•12h ago•83 comments

W.H. Auden and James Schuyler in life and literature

https://hedgehogreview.com/web-features/thr/posts/companions-on-parnassus
6•Caiero•2d ago•0 comments

Is Meta destroying its engineering organization?

https://newsletter.pragmaticengineer.com/p/why-is-meta-destroying-its-engineering
289•throwarayes•5h ago•244 comments

Making ast.walk 220x Faster

https://reflex.dev/blog/why-ast-walk-when-you-can-ast-sprint/
69•palashawas•5h ago•14 comments

Qwen-Robot Suite: A Foundation Model Suite for Physical World Intelligence

https://qwen.ai/blog?id=qwen-robotsuite
95•ilreb•8h ago•15 comments

Specs Augmented Reality Glasses

https://newsroom.snap.com/introducing-specs-augmented-reality-glasses
59•haberdasher•5h ago•31 comments

SubQ 1.1 Small

https://subq.ai/subq-1-1-small-technical-report
96•EDM115•7h ago•45 comments

Show HN: VoiceDraw – Talk system design out loud, the diagrams draw themselves

https://voicedraw.com/
15•ajaypanthagani•2h ago•3 comments

Show HN: Sabela – A Reactive Notebook for Haskell

https://sabela.datahaskell.com/
21•mchav•2d ago•1 comments

'Ghost jobs' could soon be illegal in New York

https://www.fastcompany.com/91558427/ghost-jobs-could-soon-be-illegal-in-new-york
147•toomuchtodo•5h ago•82 comments

An interview with an Apple emoji designer

https://shadycharacters.co.uk/2026/06/ollie-wagner/
93•nate•3d ago•46 comments

I've always wondered if anyone used sharing buttons on news sites and blogs

https://ankursethi.com/links/nobody-clicks-your-share-buttons/
160•speckx•1h ago•83 comments

Getting Creative with Perlin Noise Fields

https://sighack.com/post/getting-creative-with-perlin-noise-fields
160•0x000xca0xfe•2d ago•23 comments