mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- implemented pixelratio for the classic software renderer
This commit is contained in:
parent
93c05fc97e
commit
72054fb5e2
2 changed files with 5 additions and 3 deletions
|
@ -253,7 +253,7 @@ namespace swrenderer
|
||||||
auto viewport = Thread->Viewport.get();
|
auto viewport = Thread->Viewport.get();
|
||||||
|
|
||||||
double pspritexscale = viewport->viewwindow.centerxwide / 160.0;
|
double pspritexscale = viewport->viewwindow.centerxwide / 160.0;
|
||||||
double pspriteyscale = pspritexscale * viewport->YaspectMul;
|
double pspriteyscale = pspritexscale * viewport->BaseYaspectMul;
|
||||||
double pspritexiscale = 1 / pspritexscale;
|
double pspritexiscale = 1 / pspritexscale;
|
||||||
|
|
||||||
int tleft = tex->GetScaledLeftOffset();
|
int tleft = tex->GetScaledLeftOffset();
|
||||||
|
|
|
@ -98,12 +98,14 @@ namespace swrenderer
|
||||||
virtwidth = virtwidth * AspectMultiplier(viewwindow.WidescreenRatio) / 48;
|
virtwidth = virtwidth * AspectMultiplier(viewwindow.WidescreenRatio) / 48;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double ypixelstretch = (level.info) ? level.info->pixelstretch : 1.2;
|
||||||
|
|
||||||
BaseYaspectMul = 320.0 * virtheight2 / (r_Yaspect * virtwidth2);
|
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;
|
IYaspectMul = (double)virtwidth * r_Yaspect / 320.0 / virtheight;
|
||||||
InvZtoScale = YaspectMul * CenterX;
|
InvZtoScale = YaspectMul * CenterX;
|
||||||
|
|
||||||
WallTMapScale2 = IYaspectMul / CenterX;
|
WallTMapScale2 = IYaspectMul / CenterX * 1.2 / ypixelstretch;
|
||||||
|
|
||||||
// thing clipping
|
// thing clipping
|
||||||
fillshort(screenheightarray, viewwidth, (short)viewheight);
|
fillshort(screenheightarray, viewwidth, (short)viewheight);
|
||||||
|
|
Loading…
Reference in a new issue