]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
offsetmapping: make it work on ATI Radeon 9500-9800/X300 again
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Oct 2010 18:19:38 +0000 (18:19 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 30 Oct 2010 18:19:38 +0000 (18:19 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10571 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c

index 361c32d4692727a66f778743239c860e23405ed3..b0eb7cf0f8139e95a7d56f686126c9b916aa0cbc 100644 (file)
@@ -1148,15 +1148,14 @@ static const char *builtinshaderstring =
 "      RT += OffsetVector * (step(texture2D(Texture_Normal, RT.xy).a, RT.z) * 0.0625 - 0.03125);\n"
 "      return RT.xy;\n"
 "#else\n"
-"      // 3 sample offset mapping (only 3 samples because of ATI Radeon 9500-9800/X300 limits)\n"
+"      // 2 sample offset mapping (only 2 samples because of ATI Radeon 9500-9800/X300 limits)\n"
 "      // this basically moves forward the full distance, and then backs up based\n"
 "      // on height of samples\n"
 "      //vec2 OffsetVector = vec2(EyeVector.xy * ((1.0 / EyeVector.z) * OffsetMapping_Scale) * vec2(-1, 1));\n"
 "      //vec2 OffsetVector = vec2(normalize(EyeVector.xy) * OffsetMapping_Scale * vec2(-1, 1));\n"
 "      vec2 OffsetVector = vec2(normalize(EyeVector).xy * OffsetMapping_Scale * vec2(-1, 1));\n"
 "      TexCoord += OffsetVector;\n"
-"      OffsetVector *= 0.333;\n"
-"      TexCoord -= OffsetVector * texture2D(Texture_Normal, TexCoord).a;\n"
+"      OffsetVector *= 0.5;\n"
 "      TexCoord -= OffsetVector * texture2D(Texture_Normal, TexCoord).a;\n"
 "      TexCoord -= OffsetVector * texture2D(Texture_Normal, TexCoord).a;\n"
 "      return TexCoord;\n"