From 8fa17325b3e4bb818efd5aa5a047f727a295374f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 12 Feb 2021 01:22:59 +0000 Subject: Fix issue with normal affecting transparency --- gfx/gl/shaders/basicShader.fs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gfx/gl') diff --git a/gfx/gl/shaders/basicShader.fs b/gfx/gl/shaders/basicShader.fs index 3aa974f..35d3ec3 100644 --- a/gfx/gl/shaders/basicShader.fs +++ b/gfx/gl/shaders/basicShader.fs @@ -8,6 +8,6 @@ uniform vec3 lightDirection; void main() { - gl_FragColor = texture2D(sampler, texCoord0) * - clamp(dot(-lightDirection, normal0), 0.0, 1.0); + gl_FragColor = texture2D(sampler, texCoord0); + gl_FragColor.xyz *= clamp(dot(-lightDirection, normal0), 0.0, 1.0); } -- cgit v1.2.3