From 076e1f297770351f433c4807c14db03d173f74e6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 21 Mar 2019 19:14:12 +0100 Subject: [PATCH] 3d:: fixed linewidth --- polygons.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/polygons.cpp b/polygons.cpp index 3239778a..d473be59 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -677,7 +677,7 @@ void dqi_poly::gldraw() { #endif double scale_at(const transmatrix& T) { - if(DIM == 3) return 1 / (tC0(T))[2]; + if(DIM == 3 && pmodel == mdPerspective) return 1 / (tC0(T))[2]; using namespace hyperpoint_vec; hyperpoint h1, h2, h3; applymodel(tC0(T), h1); @@ -689,7 +689,7 @@ double scale_at(const transmatrix& T) { double linewidthat(const hyperpoint& h) { if(!(vid.antialias & AA_LINEWIDTH)) return 1; else if(hyperbolic && pmodel == mdDisk && vid.alpha == 1) { - double dz = h[2]; + double dz = h[DIM]; if(dz < 1 || abs(dz-current_display->scrdist) < 1e-6) return 1; else { double dx = sqrt(dz * dz - 1); @@ -698,7 +698,7 @@ double linewidthat(const hyperpoint& h) { return dfc; } } - else if(svg::in) { + else if(svg::in || inHighQual) { using namespace hyperpoint_vec; hyperpoint h0 = h / zlevel(h); transmatrix T = rgpushxto0(h0);