diff options
| author | Markus Wick <markus+github@selfnet.de> | 2015-01-31 23:45:54 +0100 |
|---|---|---|
| committer | Markus Wick <markus+github@selfnet.de> | 2015-01-31 23:45:54 +0100 |
| commit | 3c475b91ea5c4baa13b1339c3d2921938e8a3be9 (patch) | |
| tree | 6d0c80e6a23900fd8fc0e087bf918840b7dba239 /Source/Core/VideoCommon/GeometryShaderGen.cpp | |
| parent | ca5e2e6f1615a7243dbf936c06cf6d0b6bf8310a (diff) | |
| parent | 8c55ec0d5182df964b635b4440020da5ef7f9965 (diff) | |
Merge pull request #1993 from Armada651/line-perspective
GeometryShaderGen: Perspective divide the line coordinates before comparing the angle.
Diffstat (limited to 'Source/Core/VideoCommon/GeometryShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/GeometryShaderGen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp index 9566e7e3a5..08090a5322 100644 --- a/Source/Core/VideoCommon/GeometryShaderGen.cpp +++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp @@ -150,7 +150,7 @@ static inline void GenerateGeometryShader(T& out, u32 primitive_type, API_TYPE A // horizontal depending the slope of the line. out.Write( "\tfloat2 offset;\n" - "\tfloat2 to = abs(end.pos.xy - start.pos.xy);\n" + "\tfloat2 to = abs(end.pos.xy / end.pos.w - start.pos.xy / start.pos.w);\n" // FIXME: What does real hardware do when line is at a 45-degree angle? // FIXME: Lines aren't drawn at the correct width. See Twilight Princess map. "\tif (" I_LINEPTPARAMS".y * to.y > " I_LINEPTPARAMS".x * to.x) {\n" |
