frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Remove Black Color with Shaders

https://yuanchuan.dev/remove-black-color-with-shaders
54•surprisetalk•1mo ago

Comments

esperent•1mo ago
I thought this was some crazy CSS syntax I've never seen before:

    background: @shaders(
      fragment { }
      vertex { }
      texture { }
    );
Searching around just leads back to this blog though [0]. It would be amazing if this was real syntax, but I guess security reasons would probably make it a no-go for general use.

Indeed, there was an old CSS Shaders feature (in Chrome, behind a flag) behind from way back around 2013 [1]. Unclear if there's been any development since.

[0] https://yuanchuan.dev/add-shaders

[1] https://developer.chrome.com/blog/introduction-to-custom-fil...

anewhnaccount2•1mo ago
Looks like it's an extension offered by this https://css-doodle.com/
esperent•1mo ago
Yeah, good catch.

yuanchen.dev is the creator of that, I guess.

Etheryte•1mo ago
Here's hoping this will never come to browsers because this would become an endless pit of fingerprinting loopholes, similar to canvas and other related APIs.
circuit10•1mo ago
I think browsers can already block sites from reading image data from images embedded from other domains so maybe you could use the same logic here

Also WebGL/WebGPU do exist already although I guess that’s easier to disable

scotty79•1mo ago
I eagerly await times when random website's CSS can mine crypto on my GPU.
Barathkanna•1mo ago
Nice explanation. This is one of those shader tricks that feels obvious once you see it, but saves a ton of asset wrangling in practice. Treating black as a blend signal at render time instead of baking alpha channels is a clean solution, especially for effects, legacy textures, or quick prototyping.
dleeftink•1mo ago
Why not svg filters to create alpha channels? Seems to be supported by the library too (very useful btw!).
Zekio•1mo ago
wouldn't the simplest solution, just be to use transparent instead of black? or in this case #0000 instead of #000
mcherm•1mo ago
No, because the black needs to cover up other shapes (up until the final step of rendering).
Zekio•1mo ago
the examples don't really looks like it should be necessary depending on how you go around creating the shapes
woolion•1mo ago
It seems the shader transparent version is badly aliased? The effect is less noticeable on Chrome than Firefox, but it is still quite visible. This defeats the purpose of vector graphics...

It's a nice trick to play around, but that limits its usefulness.

maggit•1mo ago
It is indeed badly aliased. The technique demonstrated does not take into account antialiasing in the initial render, which causes this issue. There are ways to improve it, but I would advise against this approach in general since it doesn't handle these edge cases well.
ImHereToVote•1mo ago
If you are gonna use shaders. Why not create the whole boxes as meshes? Why bother with the CSS at all?
ZachSaucier•1mo ago
The author creates art using their own custom library that uses CSS-like syntax to render HTML, SVG, and more recently shaders. The point isn't that this is the best way to do it. It's simply a trick that the author used to do something with their own bespoke library that they were trying to do.
meindnoch•1mo ago
I sincerely hope this is not a real CSS feature.
nnevatie•1mo ago
We have come a full circle with a re-invention of luma keying, originally from the 1950s, or so.
butlike•1mo ago
I want to point out as an out-of-touch early 2010s front-end dev that CSS has comically gotten away from me, exemplified by:

vec2 uv = gl_FragCoord.xy / u_resolution.xy;

ZachSaucier•1mo ago
That's not CSS, it's GLSL

Show HN: Minecraft Creeper meets 90s Tamagotchi

https://github.com/danielbrendel/krepagotchi-game
1•foxiel•2m ago•0 comments

Show HN: Termiteam – Control center for multiple AI agent terminals

https://github.com/NetanelBaruch/termiteam
1•Netanelbaruch•2m ago•0 comments

The only U.S. particle collider shuts down

https://www.sciencenews.org/article/particle-collider-shuts-down-brookhaven
1•rolph•5m ago•0 comments

Ask HN: Why do purchased B2B email lists still have such poor deliverability?

1•solarisos•5m ago•0 comments

Show HN: Remotion directory (videos and prompts)

https://www.remotion.directory/
1•rokbenko•7m ago•0 comments

Portable C Compiler

https://en.wikipedia.org/wiki/Portable_C_Compiler
2•guerrilla•9m ago•0 comments

Show HN: Kokki – A "Dual-Core" System Prompt to Reduce LLM Hallucinations

1•Ginsabo•10m ago•0 comments

Software Engineering Transformation 2026

https://mfranc.com/blog/ai-2026/
1•michal-franc•11m ago•0 comments

Microsoft purges Win11 printer drivers, devices on borrowed time

https://www.tomshardware.com/peripherals/printers/microsoft-stops-distrubitng-legacy-v3-and-v4-pr...
2•rolph•11m ago•0 comments

Lunch with the FT: Tarek Mansour

https://www.ft.com/content/a4cebf4c-c26c-48bb-82c8-5701d8256282
2•hhs•15m ago•0 comments

Old Mexico and her lost provinces (1883)

https://www.gutenberg.org/cache/epub/77881/pg77881-images.html
1•petethomas•18m ago•0 comments

'AI' is a dick move, redux

https://www.baldurbjarnason.com/notes/2026/note-on-debating-llm-fans/
3•cratermoon•19m ago•0 comments

The source code was the moat. But not anymore

https://philipotoole.com/the-source-code-was-the-moat-no-longer/
1•otoolep•19m ago•0 comments

Does anyone else feel like their inbox has become their job?

1•cfata•19m ago•0 comments

An AI model that can read and diagnose a brain MRI in seconds

https://www.michiganmedicine.org/health-lab/ai-model-can-read-and-diagnose-brain-mri-seconds
2•hhs•23m ago•0 comments

Dev with 5 of experience switched to Rails, what should I be careful about?

1•vampiregrey•25m ago•0 comments

AlphaFace: High Fidelity and Real-Time Face Swapper Robust to Facial Pose

https://arxiv.org/abs/2601.16429
1•PaulHoule•26m ago•0 comments

Scientists discover “levitating” time crystals that you can hold in your hand

https://www.nyu.edu/about/news-publications/news/2026/february/scientists-discover--levitating--t...
2•hhs•28m ago•0 comments

Rammstein – Deutschland (C64 Cover, Real SID, 8-bit – 2019) [video]

https://www.youtube.com/watch?v=3VReIuv1GFo
1•erickhill•29m ago•0 comments

Tell HN: Yet Another Round of Zendesk Spam

2•Philpax•29m ago•0 comments

Postgres Message Queue (PGMQ)

https://github.com/pgmq/pgmq
1•Lwrless•32m ago•0 comments

Show HN: Django-rclone: Database and media backups for Django, powered by rclone

https://github.com/kjnez/django-rclone
2•cui•35m ago•1 comments

NY lawmakers proposed statewide data center moratorium

https://www.niagara-gazette.com/news/local_news/ny-lawmakers-proposed-statewide-data-center-morat...
1•geox•37m ago•0 comments

OpenClaw AI chatbots are running amok – these scientists are listening in

https://www.nature.com/articles/d41586-026-00370-w
3•EA-3167•37m ago•0 comments

Show HN: AI agent forgets user preferences every session. This fixes it

https://www.pref0.com/
6•fliellerjulian•39m ago•0 comments

Introduce the Vouch/Denouncement Contribution Model

https://github.com/ghostty-org/ghostty/pull/10559
2•DustinEchoes•41m ago•0 comments

Show HN: SSHcode – Always-On Claude Code/OpenCode over Tailscale and Hetzner

https://github.com/sultanvaliyev/sshcode
1•sultanvaliyev•41m ago•0 comments

Microsoft appointed a quality czar. He has no direct reports and no budget

https://jpcaparas.medium.com/microsoft-appointed-a-quality-czar-he-has-no-direct-reports-and-no-b...
3•RickJWagner•43m ago•0 comments

Multi-agent coordination on Claude Code: 8 production pain points and patterns

https://gist.github.com/sigalovskinick/6cc1cef061f76b7edd198e0ebc863397
1•nikolasi•44m ago•0 comments

Washington Post CEO Will Lewis Steps Down After Stormy Tenure

https://www.nytimes.com/2026/02/07/technology/washington-post-will-lewis.html
15•jbegley•44m ago•3 comments