• Content Count

  • Joined

  • Last visited

Everything posted by Dickensian

  1. <script id="fragmentShader" type="x-shader/x-fragment"> uniform sampler2D texture; uniform vec3 color; varying vec2 vUv; void main() { vec3 tColor = texture2D( texture, vUv ).rgb; float a = (length(tColor - color) - 0.5) * 7.0; gl_FragColor = vec4(tColor, a); } </script> source: https://github.com/makc/makc.github.io/blob/master/three.js/chromakey/index.html @Pryme8 would you impliment the shader like this example from a three.js project or differently? Are you aware of any approaches to defringe the edges, where the greescreen cast can show through?
  2. so, about the chromakey shader in Babylon.js; have you had any joy? :-)
  3. ...and they wonder why there's a shortage of developers of the fairer gender in our profession.
  4. @dbawel I've not had time to look at this unfortunately, although the shader that @tranlong021988 linked to looks promising for integration into Babylon.js. @dbawel I'm looking to make this work for a not-for-profit educational tool, if you'd like help with peer review on your code, please publish a link to your working repo and I'd be happy to contribute some effort to it. Thanks, Dickensian.
  5. Great link, thank you i'll pursue this and post back when I know more. BTW did you know that a lot of the tutorial links from Google search results are hitting 401's since the site changes, if an admin could set up some 301 redirects based on the logs it would be a great help to noobs like me. Dickensian
  6. Hi, thanks for your reply i've tried the Chrome support for WebM with alpha which works but is chrome desktop only, and I've read previous posts that people have done using half the video frame as a luminosity mask with html5 canvas libraries. I've not explicitly looked at multiplexed streams, but I guess they'd be another option. Even if we could encode a matte colour and mask on that with a defringe filter a single RGB video texture could work. The challenge with using two non-multiplexed sources for the texture and the matte is around maintaining the sync. Should I be looking at a custom shader or do you recommend another approach to achieve this; I'd like to ultimately have an actor walk on canvas and point at the 3D model and talk about it for an educational demo I'm working on in my free time. Dickensian
  7. Hi, What is the best way to tackle displaying a video texture with a video alpha channel? Dickensian