nv2a/psh: Handle rect tex on project3d

This commit is contained in:
Matt Borgerson 2024-07-30 17:01:41 -07:00 committed by mborgerson
parent 62acb2db7e
commit 76e2b779e3
1 changed files with 7 additions and 2 deletions

View File

@ -931,8 +931,8 @@ static MString* psh_convert(struct PixelShader *ps)
psh_append_shadowmap(ps, i, true, vars); psh_append_shadowmap(ps, i, true, vars);
} else { } else {
apply_border_adjustment(ps, vars, i, "pT%d"); apply_border_adjustment(ps, vars, i, "pT%d");
mstring_append_fmt(vars, "vec4 t%d = textureProj(texSamp%d, pT%d.xyzw);\n", mstring_append_fmt(vars, "vec4 t%d = textureProj(texSamp%d, %s(pT%d.xyzw));\n",
i, i, i); i, i, tex_remap, i);
} }
break; break;
case PS_TEXTUREMODES_CUBEMAP: case PS_TEXTUREMODES_CUBEMAP:
@ -1129,6 +1129,11 @@ static MString* psh_convert(struct PixelShader *ps)
" return vec3(norm%d(coord.xy), coord.z);\n" " return vec3(norm%d(coord.xy), coord.z);\n"
"}\n", "}\n",
i, i); i, i);
mstring_append_fmt(preflight,
"vec4 norm%d(vec4 coord) {\n"
" return vec4(norm%d(coord.xy), 0, coord.w);\n"
"}\n",
i, i);
} }
} }
} }