Commit 37c4f3a8 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Don't clamp texture lookups in the ARB fixed function fragment pipe.

parent 1d1faa02
......@@ -6176,7 +6176,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
BOOL luminance_used[MAX_TEXTURES] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
UINT lowest_disabled_stage;
const char *textype;
const char *instr, *sat;
const char *instr;
char colorcor_dst[8];
GLuint ret;
DWORD arg0, arg1, arg2;
......@@ -6316,12 +6316,6 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
default: textype = "unexpected_textype"; break;
}
if (settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP
|| settings->op[stage].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE)
sat = "";
else
sat = "_SAT";
if(settings->op[stage].projected == proj_none) {
instr = "TEX";
} else if(settings->op[stage].projected == proj_count4 ||
......@@ -6356,8 +6350,8 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
shader_addline(&buffer, "ADD ret, ret, fragment.texcoord[%u];\n", stage);
}
shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
instr, sat, stage, stage, textype);
shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n",
instr, stage, stage, textype);
if (settings->op[stage - 1].cop == WINED3D_TOP_BUMPENVMAP_LUMINANCE)
{
shader_addline(&buffer, "MAD_SAT ret.x, tex%u.z, luminance%u.x, luminance%u.y;\n",
......@@ -6367,11 +6361,11 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
} else if(settings->op[stage].projected == proj_count3) {
shader_addline(&buffer, "MOV ret, fragment.texcoord[%u];\n", stage);
shader_addline(&buffer, "MOV ret.w, ret.z;\n");
shader_addline(&buffer, "%s%s tex%u, ret, texture[%u], %s;\n",
instr, sat, stage, stage, textype);
shader_addline(&buffer, "%s tex%u, ret, texture[%u], %s;\n",
instr, stage, stage, textype);
} else {
shader_addline(&buffer, "%s%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n",
instr, sat, stage, stage, stage, textype);
shader_addline(&buffer, "%s tex%u, fragment.texcoord[%u], texture[%u], %s;\n",
instr, stage, stage, stage, textype);
}
sprintf(colorcor_dst, "tex%u", stage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment