Fix rendering of lines with the same x/y but different z.

Also enabled centered lines in WebFest homebrew.
This commit is contained in:
Henrik Rydgård committed 2022-12-26 18:16:54 +01:00
1 parent 70ae6f206b
commit c25e563d13
2 files changed
+6 -2

No files matched your search

+3 -2
View File
@@ -768,8 +768,9 @@ void SoftwareTransform::ExpandLines(int vertexCount, int &maxIndex, u16 *&inds,
const TransformedVertex &transVtx2 = transformed[indsIn[i + 1]];
// Okay, let's calculate the perpendicular.
float horizontal = transVtx2.x - transVtx1.x;
float vertical = transVtx2.y - transVtx1.y;
float horizontal = transVtx2.x * transVtx2.pos_w - transVtx1.x * transVtx1.pos_w;
float vertical = transVtx2.y * transVtx2.pos_w - transVtx1.y * transVtx1.pos_w;
Vec2f addWidth = Vec2f(-vertical, horizontal).Normalized();
float xoff = addWidth.x * dx;
+3
View File
@@ -1124,6 +1124,9 @@ UCAS40197 = true
NPEG00006 = true
NPUG80135 = true
# Webfest homebrew game (wireframe 3D rendering) looks substantially better with this.
WEBF00752 = true
[ZZT3SelectHack]
# Bypass softlock on Zettai Zetsumei Toshi 3 character select screen #4901
# This problem affects the game also on PS3