summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index feb94bfa5d..c613e237d0 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -198,15 +198,12 @@ static T GenerateVertexShader(API_TYPE api_type)
switch (texinfo.sourcerow)
{
case XF_SRCGEOM_INROW:
- // The following assert was triggered in Super Smash Bros. Project M 3.6.
- //_assert_(texinfo.inputform == XF_TEXINPUT_ABC1);
- out.Write("coord = rawpos;\n"); // pos.w is 1
+ out.Write("coord.xyz = rawpos.xyz;\n");
break;
case XF_SRCNORMAL_INROW:
if (components & VB_HAS_NRM0)
{
- _assert_(texinfo.inputform == XF_TEXINPUT_ABC1);
- out.Write("coord = float4(rawnorm0.xyz, 1.0);\n");
+ out.Write("coord.xyz = rawnorm0.xyz;\n");
}
break;
case XF_SRCCOLORS_INROW:
@@ -215,15 +212,13 @@ static T GenerateVertexShader(API_TYPE api_type)
case XF_SRCBINORMAL_T_INROW:
if (components & VB_HAS_NRM1)
{
- _assert_(texinfo.inputform == XF_TEXINPUT_ABC1);
- out.Write("coord = float4(rawnorm1.xyz, 1.0);\n");
+ out.Write("coord.xyz = rawnorm1.xyz;\n");
}
break;
case XF_SRCBINORMAL_B_INROW:
if (components & VB_HAS_NRM2)
{
- _assert_(texinfo.inputform == XF_TEXINPUT_ABC1);
- out.Write("coord = float4(rawnorm2.xyz, 1.0);\n");
+ out.Write("coord.xyz = rawnorm2.xyz;\n");
}
break;
default:
@@ -232,6 +227,12 @@ static T GenerateVertexShader(API_TYPE api_type)
out.Write("coord = float4(tex%d.x, tex%d.y, 1.0, 1.0);\n", texinfo.sourcerow - XF_SRCTEX0_INROW, texinfo.sourcerow - XF_SRCTEX0_INROW);
break;
}
+ // An input form other than ABC1 or AB11 doesn't exist
+ // But the hardware has it as a two bit field
+ _assert_(texinfo.inputform == XF_TEXINPUT_ABC1 || texinfo.inputform == XF_TEXINPUT_AB11);
+ uid_data->texMtxInfo[i].inputform = xfmem.texMtxInfo[i].inputform;
+ if (texinfo.inputform == XF_TEXINPUT_AB11)
+ out.Write("coord.z = 1.0;\n");
// first transformation
uid_data->texMtxInfo[i].texgentype = xfmem.texMtxInfo[i].texgentype;