Hacker News new | ask | show | jobs
Show HN: Fun with cell phone webcam and WebGL shaders (acidicworks.github.io)
41 points by jgeduldig 2094 days ago
5 comments

https://acidicworks.github.io/AcidFilters/

I wanted to see if I could write shaders that do real-time filtering of a webcam for iOS and Android. Should work on any mobile device or computer. Just avoid Internet Explorer and Chrome on iPhones. I'd love to know what you think!

Well, it rashes my galaxy so, whose default browser is chrome. Also crashes the phone if using Brave.

When I say crash, I mean I agree that the page can access the phone camera, then the page freezes, then next thing I know the screen is black folllwed by the phone booting up.

The phone is on Android 10, fully patched, and very stable otherwise.

Sorry about that. If I have time I'll look at Brave. As long as you have Chrome on Android, though, you should be fine.
Amazing seeing what a big performance difference there is between Chrome and Safari on a Mac. It's clear that Chrome on a Mac isn't as hardware accelerated as I previously thought.
There are many more examples on the shader toy web site.

https://www.shadertoy.com/results?query=webcam

It's running fine on my MacBook Pro with Chrome.

are these supposed to be real time? they stop working after capturing a few frames
I don’t know what causing that, but they work if you toggle video capture off and back on using the icon on the Safari menu bar.
Yeah, I'd love to know why this happens. But, that is correct, simply reload the webpage or toggle to a different camera and you should be back in business.
Same here, Safari on iPhone
And with Firefox on iOS it’s not even managing to obtain camera access.
For iOS, you must use Safari. Chrome/FireFox on iOS don't support webcam yet.
Doesn’t work with Safari on my iPhone for me I get user agent not allowed error.

Might be the adblocker so it works better than I thought.

Make an exception?
Great work.

If you can get these working as Unity post processing shaders I'd pay for it .

Hmmm... I'm just getting started with Unity, so... maybe!