mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Fix mipmap filtering bug when using nearest filter
This commit is contained in:
parent
371a8755c2
commit
aff9205057
2 changed files with 10 additions and 8 deletions
|
@ -86,9 +86,6 @@ namespace swrenderer
|
|||
texdata.ystep = args.TextureVStep();
|
||||
texdata.xfrac = args.TextureUPos();
|
||||
texdata.yfrac = args.TextureVPos();
|
||||
texdata.yshift = 32 - texdata.ybits;
|
||||
texdata.xshift = texdata.yshift - texdata.xbits;
|
||||
texdata.xmask = ((1 << texdata.xbits) - 1) << texdata.ybits;
|
||||
|
||||
texdata.source = (const uint32_t*)args.TexturePixels();
|
||||
|
||||
|
@ -111,7 +108,11 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
bool is_nearest_filter = !((magnifying && r_magfilter) || (!magnifying && r_minfilter));
|
||||
texdata.yshift = 32 - texdata.ybits;
|
||||
texdata.xshift = texdata.yshift - texdata.xbits;
|
||||
texdata.xmask = ((1 << texdata.xbits) - 1) << texdata.ybits;
|
||||
|
||||
bool is_nearest_filter = (magnifying && !r_magfilter) || (!magnifying && !r_minfilter);
|
||||
bool is_64x64 = texdata.xbits == 6 && texdata.ybits == 6;
|
||||
|
||||
auto shade_constants = args.ColormapConstants();
|
||||
|
|
|
@ -86,9 +86,6 @@ namespace swrenderer
|
|||
texdata.ystep = args.TextureVStep();
|
||||
texdata.xfrac = args.TextureUPos();
|
||||
texdata.yfrac = args.TextureVPos();
|
||||
texdata.yshift = 32 - texdata.ybits;
|
||||
texdata.xshift = texdata.yshift - texdata.xbits;
|
||||
texdata.xmask = ((1 << texdata.xbits) - 1) << texdata.ybits;
|
||||
|
||||
texdata.source = (const uint32_t*)args.TexturePixels();
|
||||
|
||||
|
@ -111,7 +108,11 @@ namespace swrenderer
|
|||
}
|
||||
}
|
||||
|
||||
bool is_nearest_filter = !((magnifying && r_magfilter) || (!magnifying && r_minfilter));
|
||||
texdata.yshift = 32 - texdata.ybits;
|
||||
texdata.xshift = texdata.yshift - texdata.xbits;
|
||||
texdata.xmask = ((1 << texdata.xbits) - 1) << texdata.ybits;
|
||||
|
||||
bool is_nearest_filter = (magnifying && !r_magfilter) || (!magnifying && !r_minfilter);
|
||||
bool is_64x64 = texdata.xbits == 6 && texdata.ybits == 6;
|
||||
|
||||
auto shade_constants = args.ColormapConstants();
|
||||
|
|
Loading…
Reference in a new issue