]> 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)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 30 Oct 2010 19:39:43 +0000 (21:39 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10571 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=2138c1a71154ae6661f42f9491f0a9e3d363d5c0

gl_rmain.c

index 9dd6a5327ab2f232d07781ac025a482990dea982..b6cd15277422a34546aabcead98766eea18313df 100644 (file)
@@ -1142,15 +1142,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"