brianchirls / Seriously.js

A real-time, node-based video effects compositor for the web built with HTML5, Javascript and WebGL
MIT License
3.87k stars 354 forks source link

Enable floating point textures #132

Closed positlabs closed 7 years ago

positlabs commented 7 years ago

I realize that this isn't widely supported, but it would be nice to have access to floating point textures if they are available.

We could add a flag to the Seriously options. It would check for support, then use the OES_texture_float extension if it's available.

@brianchirls What do you think? Feasible?

https://developer.mozilla.org/en-US/docs/Web/API/OES_texture_float

brianchirls commented 7 years ago

I started playing with this a long time ago but I gave up. Feel free to give it a shot. Start here: https://github.com/brianchirls/Seriously.js/blob/develop/seriously.js#L782

positlabs commented 7 years ago

Rad! I will play around with it. I only need it to work on Chrome desktop, so I'm hopeful.

I know it's basically unsupported on mobile, but I'm curious... what issues did you run into?

positlabs commented 7 years ago

I enabled it but didn't see any difference in quality in my app. Oh well

brianchirls commented 7 years ago

D'oh!

I'm sure there are all kinds of subtleties here. I suspect floating point textures are probably only useful if you're going to do some other kind of processing with them. Like something with depth maybe?

positlabs commented 7 years ago

I was hoping it would give me more subtlety in the colors, but I think it's simply a limitation of my webcam.

On another note, I used the kaleidoscope node today. Super fun!

lpl-mercury_2016-10-07_13-19-53 lpl-mercury_2016-10-07_13-12-47 lpl-mercury_2016-10-07_13-11-26