From 5b33f873f8c3ad664bfc0e6749aaa6266e925cd0 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 17 Mar 2006 07:50:50 +0000 Subject: [PATCH] updated default.glsl git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6131 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 57f17f31..8b7301b9 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -665,7 +665,6 @@ static const char *builtinshaderstring = "\n" " // calculate directional shading\n" " color.rgb *= AmbientColor + DiffuseColor * max(dot(surfacenormal, diffusenormal), 0.0);\n" -" //color.rgb *= AmbientColor + DiffuseColor * max(dot(surfacenormal, diffusenormal), 0.0);\n" "#ifdef USESPECULAR\n" " myhvec3 specularnormal = myhvec3(normalize(diffusenormal + myhvec3(normalize(EyeVector))));\n" " color.rgb += myhvec3(texture2D(Texture_Gloss, TexCoord)) * SpecularColor * pow(max(dot(surfacenormal, specularnormal), 0.0), SpecularPower);\n" @@ -680,14 +679,14 @@ static const char *builtinshaderstring = " // get the surface normal and light normal\n" "#ifdef SURFACENORMALIZE\n" " myhvec3 surfacenormal = normalize(myhvec3(texture2D(Texture_Normal, TexCoord)) - 0.5);\n" -" myhvec3 diffusenormal = normalize(myhvec3(texture2D(Texture_Deluxemap, TexCoordLightmap)));\n" +" myhvec3 diffusenormal = normalize(myhvec3(texture2D(Texture_Deluxemap, TexCoordLightmap)) - 0.5);\n" "#else\n" " myhvec3 surfacenormal = -1.0 + 2.0 * myhvec3(texture2D(Texture_Normal, TexCoord));\n" -" myhvec3 diffusenormal = myhvec3(texture2D(Texture_Deluxemap, TexCoordLightmap));\n" +" myhvec3 diffusenormal = -1.0 + 2.0 * myhvec3(texture2D(Texture_Deluxemap, TexCoordLightmap));\n" "#endif\n" "\n" " // calculate directional shading\n" -" myhvec3 tempcolor = color.rgb * (DiffuseScale * max(dot(surfacenormal, diffusenormal), 0.0)));\n" +" myhvec3 tempcolor = color.rgb * (DiffuseScale * max(dot(surfacenormal, diffusenormal), 0.0));\n" "#ifdef USESPECULAR\n" " myhvec3 specularnormal = myhvec3(normalize(diffusenormal + myhvec3(normalize(EyeVector))));\n" " tempcolor += myhvec3(texture2D(Texture_Gloss, TexCoord)) * SpecularScale * pow(max(dot(surfacenormal, specularnormal), 0.0), SpecularPower);\n" -- 2.39.2