← back

Show HN: Glitchy camera – a circuit-bent camera simulator in the browser

elayabharath | 2026-02-16 11:57 UTC | source

Tap to start cameraYour photos and video never leave your device. Everything is processed locally in the browser - nothing is uploaded or seen by anyone.

160 points | 21 comments | original link
Fun little side project I built after learning about circuit bending in cameras for intentional glitch effect. It is browser based camera toy where you "rewire" CCD pin pairs, turn knobs to get different glitch artefacts in real time to capture as photos. I had fun learning to simulate different pin modes - channel split, hue/phase shifts, horizontal clock delays, colour kill etc.

Here are some photos taken: https://glitchycam.com/gallery

I intentionally leaned towards skeuomorphic design for nostalgia. I miss the days where I'd spend hours making a button to look like a physical button. Here I chose to make it look like a "good enough" Teenage Engineering device UI.

I tested/used GPT-5.3-Codex to build this from scratch, since there was a lot of hype around it on X. Maybe I wasn’t using it right, but I found it needed a lot of code cleanup at every step and a lot of hand holding along the way. It missed details/nuances and didn't land the skeuomorphic buttons or the interaction polish. It mostly helped with boilerplate where there wasn't much thinking/detailing. It did give a basic starting point for the effect calculations, but didn't really move the needle on the details.

Please give it a go and let me know what you think - your photos and video never leave your browser (you can download them if you choose to). Everything is processed locally in your browser (works offline), nothing is uploaded or seen by anyone.

Comments

gitowiec | 2026-02-17 10:08 UTC
It was fun to use glitchycam. Thank you for describing your journey with AI, that is similar what I am experiencing.
tgv | 2026-02-17 11:31 UTC
It looks very convincing, and funky. How does the simulation work?
elayabharath | 2026-02-17 12:47 UTC
I capture each of the frames and process it pixel by pixel[1]. There are 3 inputs to the simulation

1. The gain knob controls the overall intensity of the effect

2. The selected pins / effects are applied to the frame. I describe a couple of the effects below:

For HClock: If the horizontal clock pin is selected, I cut the frame into variable height slices (some are 2-3px, others 8-20px). For each slice, I calculate a random shift (up to ~20% of the frame width) and move the slice to the left or right by the shift value. Then I randomise between keeping the slice normal (70% of the time), black (15%), or a random color band (15%). I then add a magenta tint + darken every other line to simulate a broken TV signal.

For OD: If output drain pin is selected, I compute a random global offset and per line offet jitter. Then for each of the pixels, I move the red to the left and blue to the right by the jitter value.

After the effects are added, I add a global noise, some corrupt lines (on ~30% of the frames, random horizontal lines of magenta/pink/white, shifted/added)

3. Finally a global hue shift is added based on the second knob.

One thing I realised is that Math.random() produced a lot of noise and flow between the frames looked disorienting. So I used a simple integer hash function to produce a more "deterministic" random number and the frames looked more stable/consistent.

[1] I should probably look for optimisations to prevent the device heating up after a few minutes.

luckys | 2026-02-17 12:31 UTC
Love it! Bookmarked :-)
imbusy111 | 2026-02-17 12:38 UTC
I like that it is based on hardware fundamentals.
fallinditch | 2026-02-17 12:48 UTC
Great job and thank you, I will be using this. I already love to use my phone camera, it's nice to have a glitch option.
harel | 2026-02-17 13:20 UTC
I love it. The aesthetics are fantastic. Can this record a video as well?
elayabharath | 2026-02-17 14:26 UTC
Not at the moment, but sounds like a great extension to build!
zoklet-enjoyer | 2026-02-17 15:19 UTC
Work around would be to screen record
flatcoke | 2026-02-17 13:25 UTC
Cool project. Love that it's entirely client-side — no uploads, no server processing. More browser tools should work this way.
naich | 2026-02-17 13:45 UTC
That was exactly my experience with AI coding - useful for ideas and boiler plate code, but not much more.
ldad | 2026-02-17 13:55 UTC
Nice! It’s the polish and attention to detail that really distinguishes this from something purely generated with AI. Getting the design details right shows the human touch.
andai | 2026-02-17 14:51 UTC
This is super cool :) How did you do the circuit bending?

Is it emulating the CCD chip somehow, or approximating the effects?

elayabharath | 2026-02-17 15:20 UTC
It is visually approximating the effects to what shorting the pins would do