]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Revert "shader_glsl: Don't apply the fringe effect if it's disabled, it fixes scr_scr...
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Dec 2020 19:39:46 +0000 (19:39 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 16 Dec 2020 19:39:46 +0000 (19:39 +0000)
This reverts commit a43f3de5a66db2b6c75248fe85f5ae1573ad0ee1.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13069 d7cf8633-e32d-0410-b094-e92efae38249

shader_glsl.h

index c9d45d660caab009496cfb94b09c67ff939036d2..11ec83dcde56c6c7ce93e78cd9f536f9e1bb6e80 100644 (file)
 "void main(void)\n",
 "{\n",
 "      float fringe = ColorFringe;//.0033f;\n",
-"      if (fringe) {\n",
-"              float amount = distance(TexCoord1, vec2(.5f,.5f));\n",
-"              vec2 offset = vec2(amount*fringe,amount*fringe);\n",
-"              dp_FragColor.xy = dp_texture2D(Texture_First, TexCoord1-offset).xy;\n",
-"              dp_FragColor.z = dp_texture2D(Texture_First, TexCoord1+offset).z;\n",
-"      } else\n",
-"              dp_FragColor = dp_texture2D(Texture_First, TexCoord1);\n",
+"      float amount = distance(TexCoord1, vec2(.5f,.5f));\n",
+"      vec2 offset = vec2(amount*fringe,amount*fringe);\n",
+"      dp_FragColor.xy = texture(Texture_First, TexCoord1-offset).xy;\n",
+"      dp_FragColor.z = texture(Texture_First, TexCoord1+offset).z;\n",
 "\n",
 "#ifdef USEFXAA\n",
 "      dp_FragColor = fxaa(dp_FragColor, 8.0); // 8.0 can be changed for larger span\n",