- implemented pixelratio for the classic software renderer

This commit is contained in:
Rachael Alexanderson 2017-09-16 05:26:18 -04:00
parent 93c05fc97e
commit 72054fb5e2
2 changed files with 5 additions and 3 deletions

View file

@ -253,7 +253,7 @@ namespace swrenderer
auto viewport = Thread->Viewport.get();
double pspritexscale = viewport->viewwindow.centerxwide / 160.0;
double pspriteyscale = pspritexscale * viewport->YaspectMul;
double pspriteyscale = pspritexscale * viewport->BaseYaspectMul;
double pspritexiscale = 1 / pspritexscale;
int tleft = tex->GetScaledLeftOffset();

View file

@ -98,12 +98,14 @@ namespace swrenderer
virtwidth = virtwidth * AspectMultiplier(viewwindow.WidescreenRatio) / 48;
}
double ypixelstretch = (level.info) ? level.info->pixelstretch : 1.2;
BaseYaspectMul = 320.0 * virtheight2 / (r_Yaspect * virtwidth2);
YaspectMul = 320.0 * virtheight / (r_Yaspect * virtwidth);
YaspectMul = 320.0 * virtheight / (r_Yaspect * virtwidth) * ypixelstretch / 1.2;
IYaspectMul = (double)virtwidth * r_Yaspect / 320.0 / virtheight;
InvZtoScale = YaspectMul * CenterX;
WallTMapScale2 = IYaspectMul / CenterX;
WallTMapScale2 = IYaspectMul / CenterX * 1.2 / ypixelstretch;
// thing clipping
fillshort(screenheightarray, viewwidth, (short)viewheight);