From da3ff98774cb912126cba353e608b4410347eb47 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Tue, 10 Dec 2019 01:33:48 +1100 Subject: [PATCH] alphaover: return black if no textures are enabled Not doing this appeared to corrupt the composited buffer somehow and return a black image if there were two empty texture connections daisychained together on two AlphaOver instances. --- app/shaders/alphaover.frag | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/shaders/alphaover.frag b/app/shaders/alphaover.frag index a5467e0a3..785a5ebec 100644 --- a/app/shaders/alphaover.frag +++ b/app/shaders/alphaover.frag @@ -11,6 +11,11 @@ void main(void) { vec4 base_col = texture2D(base_in, ove_texcoord); vec4 blend_col = texture2D(blend_in, ove_texcoord); + if (!base_in_enabled && !blend_in_enabled) { + gl_FragColor = vec4(0.0); + return; + } + if (!base_in_enabled) { gl_FragColor = blend_col; return;