mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
VertexShaderGen: Fix a shader compilation error.
This commit is contained in:
parent
5a78351033
commit
4d868705fd
@ -24,7 +24,7 @@
|
|||||||
// Increment this every time you change shader generation code.
|
// Increment this every time you change shader generation code.
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
LINEAR_DISKCACHE_VER = 6975
|
LINEAR_DISKCACHE_VER = 6976
|
||||||
};
|
};
|
||||||
|
|
||||||
// On disk format:
|
// On disk format:
|
||||||
|
@ -357,7 +357,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
|
|||||||
default:
|
default:
|
||||||
_assert_(texinfo.sourcerow <= XF_SRCTEX7_INROW);
|
_assert_(texinfo.sourcerow <= XF_SRCTEX7_INROW);
|
||||||
if (components & (VB_HAS_UV0<<(texinfo.sourcerow - XF_SRCTEX0_INROW)) )
|
if (components & (VB_HAS_UV0<<(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);
|
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);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,9 +389,9 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
|
|||||||
default:
|
default:
|
||||||
if (components & (VB_HAS_TEXMTXIDX0<<i)) {
|
if (components & (VB_HAS_TEXMTXIDX0<<i)) {
|
||||||
if (texinfo.projection == XF_TEXPROJ_STQ)
|
if (texinfo.projection == XF_TEXPROJ_STQ)
|
||||||
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);
|
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);
|
||||||
else {
|
else {
|
||||||
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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user