adam Posted September 11, 2016 Share Posted September 11, 2016 2 hours ago, Pryme8 said: still cant find the video shader, Have you seen Firefox's shader editor? https://developer.mozilla.org/en-US/docs/Tools/Shader_Editor dbawel and Pryme8 2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted September 11, 2016 Share Posted September 11, 2016 No that is awesome! Quote Link to comment Share on other sites More sharing options...
dbawel Posted September 11, 2016 Share Posted September 11, 2016 On 9/8/2016 at 1:41 AM, tranlong021988 said: This is a solution using chromakey Shader for video texture: https://makc3d.wordpress.com/2014/04/01/transparent-video-texture-in-three-js/ It's working with threejs but you can implement Chroma Key Shader to BabylonJS with a little modification. I keep coming back to the above Three.js demo, as it's already passed through a few versions and issues such as normalizing color has shown to be less useful in the final demo. I had to abort this currently, as I have a new build due with GUI and form changes tomorrow. But looking at the examples of the basic framework adjusting transparency, we shouldn't be that far away. I'm glad to see @Pryme8 on this, as he's already ahead of what I was building by making the code MUCH simpler. I would however, love to see support of .webm alpha channels, as this should work in most every browser currently. And their are newer H.265 formats coming soon which support an alpha channel with very little overhead. DB Quote Link to comment Share on other sites More sharing options...
mkaouri Posted January 16, 2018 Share Posted January 16, 2018 A solution for Chromakey video texture using BabylonJS. Check the demo: http://www.babylonjs-playground.com/#P75330 Cheers. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 16, 2018 Share Posted January 16, 2018 Cool method, now you just need a tolerance value! mkaouri 1 Quote Link to comment Share on other sites More sharing options...
thrice Posted November 28, 2018 Share Posted November 28, 2018 In case anyone else stumbles on this thread like I did yesterday, here is a working example on how you can faux do this. Basically rather than use a transparency channel I discard black pixels, and allow a discard threshold to be set, which will call discard on any pixel whose sum of r.g.b < discard threshold. https://www.babylonjs-playground.com/#TQUA6H I am however having some issues with video textures/instances but going to open a separate issue for that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.