From a101d22599c9052ab242d68e12522732e710cc9e Mon Sep 17 00:00:00 2001 From: rodri Date: Mon, 15 Apr 2024 22:39:00 +0000 Subject: render: split tiles vertically instead of horizontally. this makes more sense memory-wise, and it also fixes a clipping glitch that was occurring at tile boundaries. --- render.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/render.c b/render.c index 52dfbe7..00212c1 100644 --- a/render.c +++ b/render.c @@ -411,7 +411,7 @@ tilerdurden(void *arg) Triangle *t; /* triangles to raster */ Rectangle *wr; Channel **taskc; - ulong Δx, nproc; + ulong Δy, nproc; int i, nt; uvlong t0; @@ -444,10 +444,10 @@ tilerdurden(void *arg) vsp.su = params; wr[0] = params->fb->r; - Δx = Dx(wr[0])/nproc; - wr[0].max.x = wr[0].min.x + Δx; + Δy = Dy(wr[0])/nproc; + wr[0].max.y = wr[0].min.y + Δy; for(i = 1; i < nproc; i++) - wr[i] = rectaddpt(wr[i-1], Pt(Δx,0)); + wr[i] = rectaddpt(wr[i-1], Pt(0,Δy)); verts = params->entity->mdl->obj->vertdata[OBJVGeometric].verts; tverts = params->entity->mdl->obj->vertdata[OBJVTexture].verts; -- cgit v1.2.3