focal length used in the wrong sense
glouw opened this issue · 0 comments
glouw commented
offset can be simplified with the focal length. original xfocal() is wrongly named and can be removed. xfcast() can be removed too. fov changes must then change the focal length and not focal diameter.
const float weight = r.traceline.fov.a.x / r.traceline.corrected.x;
for(int x = 0; x < r.projection.clamped.bot; x++)
{
const float offset = weight / (1.0 - (float) x / r.projection.mid);
const Point where = wheres[sl.sdl.yres - 1 - x] = xlerp(r.traceline.trace, offset);
...