ShaderGen: remove nonsense for() if() {}

This commit is contained in:
degasus 2013-10-15 14:31:02 +02:00
parent 72c1e143f3
commit f62579761c
2 changed files with 4 additions and 6 deletions

View File

@ -318,9 +318,8 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
// Let's set up attributes
if (xfregs.numTexGen.numTexGens < 7)
{
for (int i = 0; i < 8; ++i)
if(i < xfregs.numTexGen.numTexGens)
out.Write("VARYIN float3 uv%d_2;\n", i);
for (int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
out.Write("VARYIN float3 uv%d_2;\n", i);
out.Write("VARYIN float4 clipPos_2;\n");
if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
{

View File

@ -483,9 +483,8 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
if (xfregs.numTexGen.numTexGens < 7)
{
for (unsigned int i = 0; i < 8; ++i)
if(i < xfregs.numTexGen.numTexGens)
out.Write(" uv%d_2.xyz = o.tex%d;\n", i, i);
for (unsigned int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
out.Write(" uv%d_2.xyz = o.tex%d;\n", i, i);
out.Write(" clipPos_2 = o.clipPos;\n");
if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
out.Write(" Normal_2 = o.Normal;\n");