mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Prevent linear filtering on RGBA32F images when the system doesn't support it.
--HG-- branch : minor
This commit is contained in:
@@ -501,6 +501,14 @@ void Image::setFilter(const Texture::Filter &f)
|
||||
|
||||
filter = f;
|
||||
|
||||
if (!data.empty() && !hasTextureFilteringSupport(data[0]->getFormat()))
|
||||
{
|
||||
filter.mag = filter.min = FILTER_NEAREST;
|
||||
|
||||
if (filter.mipmap == FILTER_LINEAR)
|
||||
filter.mipmap = FILTER_NEAREST;
|
||||
}
|
||||
|
||||
// We don't want filtering or (attempted) mipmaps on the default texture.
|
||||
if (usingDefaultTexture)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user