Revert "VertexShaderGen: Fix a shader compilation error.". I'm an idiot :p

This reverts commit 4d868705fd.
This commit is contained in:
NeoBrainX 2012-12-24 21:27:53 +01:00
parent 2c58385fe2
commit e3e14af0dd
2 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@
// Increment this every time you change shader generation code.
enum
{
LINEAR_DISKCACHE_VER = 6976
LINEAR_DISKCACHE_VER = 6975
};
// On disk format:

View File

@ -357,7 +357,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
default:
_assert_(texinfo.sourcerow <= XF_SRCTEX7_INROW);
if (components & (VB_HAS_UV0<<(texinfo.sourcerow - XF_SRCTEX0_INROW)) )
WRITE(p, "coord = float4(o.tex%d.x, o.tex%d.y, 1.0f, 1.0f);\n", texinfo.sourcerow - XF_SRCTEX0_INROW, texinfo.sourcerow - XF_SRCTEX0_INROW);
WRITE(p, "coord = float4(tex%d.x, tex%d.y, 1.0f, 1.0f);\n", texinfo.sourcerow - XF_SRCTEX0_INROW, texinfo.sourcerow - XF_SRCTEX0_INROW);
break;
}
@ -389,9 +389,9 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
default:
if (components & (VB_HAS_TEXMTXIDX0<<i)) {
if (texinfo.projection == XF_TEXPROJ_STQ)
WRITE(p, "o.tex%d.xyz = float3(dot(coord, " I_TRANSFORMMATRICES".T[o.tex%d.z].t), dot(coord, " I_TRANSFORMMATRICES".T[o.tex%d.z+1].t), dot(coord, " I_TRANSFORMMATRICES".T[o.tex%d.z+2].t));\n", i, i, i, i);
WRITE(p, "o.tex%d.xyz = float3(dot(coord, " I_TRANSFORMMATRICES".T[tex%d.z].t), dot(coord, " I_TRANSFORMMATRICES".T[tex%d.z+1].t), dot(coord, " I_TRANSFORMMATRICES".T[tex%d.z+2].t));\n", i, i, i, i);
else {
WRITE(p, "o.tex%d.xyz = float3(dot(coord, " I_TRANSFORMMATRICES".T[o.tex%d.z].t), dot(coord, " I_TRANSFORMMATRICES".T[o.tex%d.z+1].t), 1);\n", i, i, i);
WRITE(p, "o.tex%d.xyz = float3(dot(coord, " I_TRANSFORMMATRICES".T[tex%d.z].t), dot(coord, " I_TRANSFORMMATRICES".T[tex%d.z+1].t), 1);\n", i, i, i);
}
}
else {