summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/GeometryShaderGen.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2017-01-03 20:49:21 +1000
committerStenzek <stenzek@gmail.com>2017-01-04 20:23:07 +1000
commit176177af491645d080697957567b18906f2fe398 (patch)
treea4042b0cb2fe2654a046fc1fc8f5767d56617552 /Source/Core/VideoCommon/GeometryShaderGen.cpp
parentcbb0f78dd159ebbfc089d7207c371da6e2a33abf (diff)
GeometryShaderGen: Use lower-left origin for point texture coordinates
From what I can tell, the emulated GPU places (0,0) at the lower left of the image, and we were generating texture coordinates so that (0,0) was at the upper-left in the expansion geometry shader, causing textures used by point sprites to be flipped vertically. Fixes the upside-down A button in Mario Golf.
Diffstat (limited to 'Source/Core/VideoCommon/GeometryShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index ab2154ef17..aeb7f76b4b 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -285,9 +285,9 @@ ShaderCode GenerateGeometryShaderCode(APIType ApiType, const geometry_shader_uid
for (unsigned int i = 0; i < uid_data->numTexGens; ++i)
{
out.Write("\tif (((" I_TEXOFFSET "[1] >> %d) & 0x1) != 0) {\n", i);
- out.Write("\t\tll.tex%d.xy += float2(0,1) * texOffset;\n", i);
- out.Write("\t\tlr.tex%d.xy += texOffset;\n", i);
- out.Write("\t\tur.tex%d.xy += float2(1,0) * texOffset;\n", i);
+ out.Write("\t\tul.tex%d.xy += float2(0,1) * texOffset;\n", i);
+ out.Write("\t\tur.tex%d.xy += texOffset;\n", i);
+ out.Write("\t\tlr.tex%d.xy += float2(1,0) * texOffset;\n", i);
out.Write("\t}\n");
}
out.Write("\t}\n");