diff options
author | rodri <rgl@antares-labs.eu> | 2024-04-15 22:39:00 +0000 |
---|---|---|
committer | rodri <rgl@antares-labs.eu> | 2024-04-15 22:39:00 +0000 |
commit | a101d22599c9052ab242d68e12522732e710cc9e (patch) | |
tree | f15ee6ffc57e91f6116b5b17d6b5ca37936db99d | |
parent | fc8284f73c62cc205bcdc1be04802763a019ec1b (diff) | |
download | libgraphics-a101d22599c9052ab242d68e12522732e710cc9e.tar.gz libgraphics-a101d22599c9052ab242d68e12522732e710cc9e.tar.bz2 libgraphics-a101d22599c9052ab242d68e12522732e710cc9e.zip |
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.
-rw-r--r-- | render.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; |