Closed MoorPoor closed 6 months ago
Thanks for the suggestion!
I added a 'Luminance' parameter to the Lumakey filter: white lumakey with Luminance = 1.0
If you try version Beta 657b05d077a480a1fc89dada6af6b56905c6c211, you can access the new parameter;
Alternatively, you can create a custom filter with the following code:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
float Luminance = 1.0;
float Threshold = 0.5;
float Tolerance = 0.5;
vec2 fragPos = fragCoord.xy / iResolution.xy;
vec3 RGB = texture(iChannel0, fragPos).rgb;
float L = dot(RGB, vec3(0.299, 0.587, 0.114));
fragColor = vec4( RGB, smoothstep( Threshold, Threshold + Tolerance * Tolerance, abs(Luminance - L) ) );
}
thanks. works great so far!
I checked the beta with alpha key now. works perfectly as far as I can tell
NB: see #117 for update (bug fix)
As far as I can tell, it's quite difficult to key white from a source. Lumakey removes black well, but there is no option for white. I couldn't get any good results under Chromykey either. I think another threshold for bright parts should be added at Lumakey. What do you think?
this is how Lumakey is solved in OBS - just as an example
(Video background is white)