Fix voxel clipping bug

This commit is contained in:
Magnus Norddahl 2017-02-11 23:23:34 +01:00
parent 8c5360e547
commit 0cea344dce
2 changed files with 1 additions and 2 deletions

View file

@ -157,7 +157,7 @@ namespace swrenderer
auto viewport = RenderViewport::Instance(); auto viewport = RenderViewport::Instance();
double scale = viewport->InvZtoScale * spr->idepth; double scale = viewport->InvZtoScale * spr->idepth;
double hzb = DBL_MIN, hzt = DBL_MAX; double hzb = -DBL_MAX, hzt = DBL_MAX;
if (spr->IsVoxel() && spr->floorclip != 0) if (spr->IsVoxel() && spr->floorclip != 0)
{ {

View file

@ -558,7 +558,6 @@ namespace swrenderer
for (int x = xxl; x < xxr; ++x) for (int x = xxl; x < xxr; ++x)
{ {
drawerargs.SetDest(lxt + x, z1); drawerargs.SetDest(lxt + x, z1);
drawerargs.SetSolidColor(100);
drawerargs.SetCount(z2 - z1); drawerargs.SetCount(z2 - z1);
drawerargs.DrawVoxelColumn(thread, yplc[xxl], yinc, col, zleng); drawerargs.DrawVoxelColumn(thread, yplc[xxl], yinc, col, zleng);
} }