partial revert of 8a6f747408

texture_rect isn't in core 3.0, so the long texture function must be used
This commit is contained in:
degasus 2013-01-22 00:18:42 +01:00
parent da0ec6618f
commit 6afc30240a
4 changed files with 7 additions and 7 deletions

View File

@ -247,7 +247,7 @@ void WriteSampleColor(char*& p, const char* colorComp, const char* dest, API_TYP
else if (ApiType == API_D3D11)
texSampleOpName = "tex0.Sample";
else
texSampleOpName = "texture";
texSampleOpName = "texture2DRect";
// the increment of sampleUv.x is delayed, so we perform it here. see WriteIncrementSampleX.
const char* texSampleIncrementUnit;

View File

@ -38,7 +38,7 @@
#define TEX2D GL_TEXTURE_RECTANGLE_ARB
#define PREC
#define TEXTYPE "sampler2DRect"
#define TEXFUNC "texture"
#define TEXFUNC "texture2DRect"
#endif

View File

@ -484,7 +484,7 @@ TextureCache::TextureCache()
"void main(){\n"
" vec4 Temp0, Temp1;\n"
" vec4 K0 = vec4(0.5, 0.5, 0.5, 0.5);\n"
" Temp0 = texture(samp9, uv0);\n"
" Temp0 = texture2DRect(samp9, uv0);\n"
" Temp0 = Temp0 * colmat[5];\n"
" Temp0 = Temp0 + K0;\n"
" Temp0 = floor(Temp0);\n"
@ -513,7 +513,7 @@ TextureCache::TextureCache()
" vec4 R0, R1, R2;\n"
" vec4 K0 = vec4(255.99998474121, 0.003921568627451, 256.0, 0.0);\n"
" vec4 K1 = vec4(15.0, 0.066666666666, 0.0, 0.0);\n"
" R2 = texture(samp9, uv0);\n"
" R2 = texture2DRect(samp9, uv0);\n"
" R0.x = R2.x * K0.x;\n"
" R0.x = floor(R0).x;\n"
" R0.yzw = (R0 - R0.x).yzw;\n"

View File

@ -78,8 +78,8 @@ void CreatePrograms()
"out vec4 ocol0;\n"
"void main()\n"
"{\n"
" vec3 c0 = texture(samp9, uv0).rgb;\n"
" vec3 c1 = texture(samp9, uv0 + vec2(1.0, 0.0)).rgb;\n"
" vec3 c0 = texture2DRect(samp9, uv0).rgb;\n"
" vec3 c1 = texture2DRect(samp9, uv0 + vec2(1.0, 0.0)).rgb;\n"
" vec3 c01 = (c0 + c1) * 0.5;\n"
" vec3 y_const = vec3(0.257,0.504,0.098);\n"
" vec3 u_const = vec3(-0.148,-0.291,0.439);\n"
@ -98,7 +98,7 @@ void CreatePrograms()
"out vec4 ocol0;\n"
"void main()\n"
"{\n"
" vec4 c0 = texture(samp9, uv0).rgba;\n"
" vec4 c0 = texture2DRect(samp9, uv0).rgba;\n"
" float f = step(0.5, fract(uv0.x));\n"
" float y = mix(c0.b, c0.r, f);\n"
" float yComp = 1.164f * (y - 0.0625f);\n"