From: divverent Date: Sat, 30 Oct 2010 18:19:38 +0000 (+0000) Subject: offsetmapping: make it work on ATI Radeon 9500-9800/X300 again X-Git-Tag: xonotic-v0.1.0preview~56^2~46 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2138c1a71154ae6661f42f9491f0a9e3d363d5c0;p=xonotic%2Fdarkplaces.git offsetmapping: make it work on ATI Radeon 9500-9800/X300 again git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10571 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 361c32d4..b0eb7cf0 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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"