aboutsummaryrefslogtreecommitdiff
path: root/src/render.zig
AgeCommit message (Collapse)Author
2021-10-27Update SFML wrappertslil clingman
2021-10-25Mouse look!tslil clingman
2021-10-25Corrected bug in colour blending, chose black instead of transparenttslil clingman
2021-10-22Specialise layers to be either lists of vertices or squarestslil clingman
2021-10-19Fix literal corner casetslil clingman
2021-10-18Working on correct verts then horizs then... ordering and edge casestslil clingman
2021-10-17Sprinkling the magic of FOV_SCALE from the camera matrix ... works?tslil clingman
What is going on here? Indeed this eliminated another rendering issue.
2021-10-17Additional bug fixtslil clingman
Essentially highest_drawn should be monotonic between squares, the only time we should allow ourselves to draw below this is in the special case of drawing a vertical portion over the horizontal portion of a previous layer in the same square.
2021-10-17A stray -1. Next issue: horizontal doesn't meet vertical on barrels?tslil clingman
2021-10-17Still z_buffer issues, what is happeningtslil clingman
2021-10-17Well, it's not quite right, but this is the general directiontslil clingman
2021-10-17Texture scalingtslil clingman
2021-10-15Well, there's no reason not to do this ... Multiple polygon layers!tslil clingman
2021-10-15Minor tweaktslil clingman
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