- Fix depth values when screenblocks less than 11
This commit is contained in:
parent
b1355d472c
commit
1a5f679d43
2 changed files with 6 additions and 1 deletions
|
|
@ -178,7 +178,8 @@ namespace swrenderer
|
|||
double curyfrac = baseyfrac + ystepscale * (x1 - minx);
|
||||
|
||||
double distance = viewport->PlaneDepth(y, planeheight);
|
||||
float zbufferdepth = 1.0f / (distance * Thread->Viewport->viewwindow.FocalTangent);
|
||||
|
||||
float zbufferdepth = (float)(1.0 / fabs(planeheight / Thread->Viewport->ScreenToViewY(y, 1.0)));
|
||||
|
||||
drawerargs.SetTextureUStep(distance * xstepscale / drawerargs.TextureWidth());
|
||||
drawerargs.SetTextureUPos((distance * curxfrac + pviewx) / drawerargs.TextureWidth());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue