Skip to content

Commit

Permalink
nv2a/psh: Handle rect tex on project3d
Browse files Browse the repository at this point in the history
  • Loading branch information
mborgerson committed Jul 31, 2024
1 parent d9ce5dd commit 9960231
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions hw/xbox/nv2a/pgraph/glsl/psh.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,8 @@ static MString* psh_convert(struct PixelShader *ps)
psh_append_shadowmap(ps, i, true, vars);
} else {
apply_border_adjustment(ps, vars, i, "pT%d");
mstring_append_fmt(vars, "vec4 t%d = textureProj(texSamp%d, pT%d.xyzw);\n",
i, i, i);
mstring_append_fmt(vars, "vec4 t%d = textureProj(texSamp%d, %s(pT%d.xyzw));\n",
i, i, tex_remap, i);
}
break;
case PS_TEXTUREMODES_CUBEMAP:
Expand Down Expand Up @@ -1129,6 +1129,11 @@ static MString* psh_convert(struct PixelShader *ps)
" return vec3(norm%d(coord.xy), coord.z);\n"
"}\n",
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);
}
}
}
Expand Down

0 comments on commit 9960231

Please sign in to comment.