Add Nearest Mipmap Anisotropic filter option to decals and projectors

This is consistent with the BaseMaterial3D filtering options.
It can be used for high-quality pixel art textures that remain sharp
when viewed at oblique angles, but prevents them from becoming grainy
thanks to mipmaps.
This commit is contained in:
Hugo Locurcio
2021-08-12 00:44:24 +02:00
parent 3b39f00761
commit d041ca6c02
6 changed files with 75 additions and 28 deletions

View File

@ -495,9 +495,10 @@ public:
enum LightProjectorFilter {
LIGHT_PROJECTOR_FILTER_NEAREST,
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS,
LIGHT_PROJECTOR_FILTER_LINEAR,
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS,
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS,
LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC,
LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC,
};
@ -557,9 +558,10 @@ public:
enum DecalFilter {
DECAL_FILTER_NEAREST,
DECAL_FILTER_NEAREST_MIPMAPS,
DECAL_FILTER_LINEAR,
DECAL_FILTER_NEAREST_MIPMAPS,
DECAL_FILTER_LINEAR_MIPMAPS,
DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC,
DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC,
};