- Removed power-of-two limitation from span drawers, except for slopes
This commit is contained in:
parent
f909b82074
commit
fa36677bdb
10 changed files with 203 additions and 220 deletions
|
|
@ -171,27 +171,11 @@ namespace swrenderer
|
|||
|
||||
double distance = viewport->PlaneDepth(y, planeheight);
|
||||
|
||||
if (drawerargs.TextureWidthBits() != 0)
|
||||
{
|
||||
drawerargs.SetTextureUStep(xs_ToFixed(32 - drawerargs.TextureWidthBits(), distance * xstepscale));
|
||||
drawerargs.SetTextureUPos(xs_ToFixed(32 - drawerargs.TextureWidthBits(), distance * curxfrac + pviewx));
|
||||
}
|
||||
else
|
||||
{
|
||||
drawerargs.SetTextureUStep(0);
|
||||
drawerargs.SetTextureUPos(0);
|
||||
}
|
||||
drawerargs.SetTextureUStep(distance * xstepscale / drawerargs.TextureWidth());
|
||||
drawerargs.SetTextureUPos((distance * curxfrac + pviewx) / drawerargs.TextureWidth());
|
||||
|
||||
if (drawerargs.TextureHeightBits() != 0)
|
||||
{
|
||||
drawerargs.SetTextureVStep(xs_ToFixed(32 - drawerargs.TextureHeightBits(), distance * ystepscale));
|
||||
drawerargs.SetTextureVPos(xs_ToFixed(32 - drawerargs.TextureHeightBits(), distance * curyfrac + pviewy));
|
||||
}
|
||||
else
|
||||
{
|
||||
drawerargs.SetTextureVStep(0);
|
||||
drawerargs.SetTextureVPos(0);
|
||||
}
|
||||
drawerargs.SetTextureVStep(distance * ystepscale / drawerargs.TextureHeight());
|
||||
drawerargs.SetTextureVPos((distance * curyfrac + pviewy) / drawerargs.TextureHeight());
|
||||
|
||||
if (viewport->RenderTarget->IsBgra())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue