summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-02-07 13:23:20 +0100
committerdegasus <wickmarkus@web.de>2013-02-07 13:23:20 +0100
commit10567cb23fcaf980936ce576a4fcad1dfaa36cca (patch)
tree5ed6c2f087bea22c06fa58ece02e36781b903296 /Source/Core/VideoCommon
parentf079b04a5daafc1def25bb26c1111c4b02039666 (diff)
always write to uv coords
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderGen.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
index dc66041643..42b63f0929 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp
@@ -586,8 +586,11 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType)
// clipPos/w needs to be done in pixel shader, not here
if (xfregs.numTexGen.numTexGens < 7) {
- for (unsigned int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
- WRITE(p, " uv%d_2.xyz = o.tex%d;\n", i, i);
+ for (unsigned int i = 0; i < 8; ++i)
+ if(i < xfregs.numTexGen.numTexGens)
+ WRITE(p, " uv%d_2.xyz = o.tex%d;\n", i, i);
+ else
+ WRITE(p, " uv%d_2.xyz = float3(0.0f, 0.0f, 0.0f);\n", i);
WRITE(p, " clipPos_2 = o.clipPos;\n");
if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
WRITE(p, " Normal_2 = o.Normal;\n");