aboutsummaryrefslogtreecommitdiff
path: root/src/render.zig
AgeCommit message (Collapse)Author
2021-10-14Texture mapping!tslil clingman
We already calculate almost everything we need if we want to map textures per line segment v[i]->v[i+1] for v the list of vertices per cell.
2021-10-13Polygonal walls!tslil clingman
It was essentially working before, just some indexing bug.
2021-10-12It almost works, but for some reason everything only has 3 sides...?tslil clingman
2021-10-12Merge branch 'main' into polygon_wallstslil clingman
2021-10-12More texture bugs, hoorahHEADmaintslil clingman
Might as well also compute texel_y directly like texel_x for objects and skip a multiplication in favour of addition
2021-10-12No need to recalculate the index inside each looptslil clingman
Here's hoping Zig is smart enough (TM) to constant-ify all of these @floatToInt(type, PlaneXXX) values.
2021-10-11Fix many texture bugs, access memory in increasing order everywheretslil clingman
- switch z_buffer to use screen space coordinates (why does y increase downward!) - extract pointless (re)calculations from inside hot loops, in particular from object drawing but also to the extent allowed by applicable law from floor and ceiling drawing
2021-10-10Untested first mock up of polygon intersection in squaretslil clingman
2021-10-10Refactor: extract rendering code from Player struct into Renderertslil clingman
Some bonus off by ones and rounding corrections