From 854c72263c0f5ae8fda20a59eabcd3d932a69430 Mon Sep 17 00:00:00 2001 From: plagman Date: Sat, 16 May 2009 00:50:30 +0000 Subject: [PATCH] More tweaks to the specular lighting model. git-svn-id: https://svn.eduke32.com/eduke32@1381 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/build/src/polymer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/build/src/polymer.c b/polymer/eduke32/build/src/polymer.c index b28bb96fb..8bf4df128 100644 --- a/polymer/eduke32/build/src/polymer.c +++ b/polymer/eduke32/build/src/polymer.c @@ -255,7 +255,7 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = { "\n", // frag_prog " diffuseTexel = texture2D(diffuseMap, commonTexCoord.st);\n" - " specTexel = diffuseTexel;\n" + " specTexel.rgb = diffuseTexel.rgb * diffuseTexel.a;\n" " if (isLightingPass == 0)\n" " result *= diffuseTexel;\n" "\n", @@ -487,9 +487,9 @@ _prprogrambit prprogrambits[PR_BIT_COUNT] = { "\n" " R = reflect(-L, N);\n" "\n" - " lightDiffuse = diffuseTexel.a * gl_Color.a * shadowResult * lightTexel *\n" + " lightDiffuse = gl_Color.a * shadowResult * lightTexel *\n" " gl_LightSource[0].diffuse.rgb * lightAttenuation * spotAttenuation;\n" - " result += vec4(lightDiffuse * diffuseTexel.rgb * NdotL, 0.0);\n" + " result += vec4(lightDiffuse * diffuseTexel.a * diffuseTexel.rgb * NdotL, 0.0);\n" "\n" " lightSpecular = pow( max(dot(R, E), 0.0), specularMaterial.x * specTexel.a) * specularMaterial.y;\n" " result += vec4(lightDiffuse * specTexel.rgb * lightSpecular, 0.0);\n"