From 719f9e2c8d0ba37a8217e910ad510a74b39a1f6c Mon Sep 17 00:00:00 2001 From: Nils Schmidt Date: Fri, 29 Dec 2023 17:24:47 +0100 Subject: [PATCH] Added alpha channel reset for specular and diffuse (OpenGL 3.3) --- src/org/nschmidt/ldparteditor/opengl/renderer.frag | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/org/nschmidt/ldparteditor/opengl/renderer.frag b/src/org/nschmidt/ldparteditor/opengl/renderer.frag index 084860ee3..95990bc03 100644 --- a/src/org/nschmidt/ldparteditor/opengl/renderer.frag +++ b/src/org/nschmidt/ldparteditor/opengl/renderer.frag @@ -306,6 +306,10 @@ void main() } + // It is not possible to set alpha with lightAmbientDiffuse.a = X or lightSpecular.a = X + lightAmbientDiffuse = vec4(lightAmbientDiffuse.r,lightAmbientDiffuse.g,lightAmbientDiffuse.b,0.0); + lightSpecular = vec4(lightSpecular.r,lightSpecular.g,lightSpecular.b,0.0); + if (texmapswitch > 0.5f) { vec4 texColor = texture2D(ldpePngSampler, tex.xy); texColor.r *= factor;