Skip to content

Commit

Permalink
Added alpha channel reset for specular and diffuse (OpenGL 3.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsschmidt1337 committed Dec 29, 2023
1 parent 14949d0 commit 719f9e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/org/nschmidt/ldparteditor/opengl/renderer.frag
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 719f9e2

Please sign in to comment.