glsl-blend icon indicating copy to clipboard operation
glsl-blend copied to clipboard

shader for opacity of both layer

Open AndrewChan2022 opened this issue 3 years ago • 2 comments

what is shader for base.a < 1 and overlay.a < 1

AndrewChan2022 avatar Jul 10 '21 09:07 AndrewChan2022

This works for transparent images:

float blendOpac = blendLayerOpacity * blend.a;
vec4 outCol;
outCol.rgb = blendScreen(base.rgb, blend.rgb, blendOpac); // works for any blendMode
outCol.a =  blendOpac + base.a;

felixturner avatar Apr 26 '22 18:04 felixturner