1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-09-22 15:03:30 +01:00
Ryujinx/Ryujinx.Graphics.Gpu/Image
riperiperi 788aec511f
Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832)
* Limit Custom Anisotropic Filtering to only fully mipmapped textures

There's a major flaw with the anisotropic filtering setting that causes @GamerzHell9137 to report graphical bugs that otherwise wouldn't be there, because he just won't set it to Auto. This should fix those issues, hopefully.

These bugs are generally because anisotropic filtering is enabled on something that it shouldn't be, such as a post process filter or some data texture. This PR maintains two host samplers when custom AF is enabled, and only uses the forced AF one when the texture is 2d and fully mipmapped (goes down to 1x1). This is because game textures are the ideal target for this filtering, and they are typically fully mipmapped, unlike things like screen render targets which usually have 1 or just a few levels.

This also only enables AF on mipmapped samplers where the filtering is bilinear or trilinear. This should be self explanatory.

This PR also allows the changing of Anisotropic Filtering at runtime, and you can immediately see the changes. All samplers are flushed from the cache if the setting changes, causing them to be recreated with the new custom AF value. This brings it in line with our resolution scale. 😌

* Expected minimum mip count for large textures rather than all, address feedback

* Use Target rather than Info.Target

* Retrigger build?

* Fix rebase
2021-11-13 16:04:21 -03:00
..
AutoDeleteCache.cs Force copy when auto-deleting a texture with dependencies (#2687) 2021-09-29 02:11:05 +02:00
FormatInfo.cs
FormatTable.cs Add another Depth32F texture format (#2304) 2021-05-22 01:15:08 +02:00
ITextureDescriptor.cs
Pool.cs Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
ReductionFilter.cs
Sampler.cs Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
SamplerDescriptor.cs Use a descriptor cache for faster pool invalidation. (#1977) 2021-01-29 14:19:06 +11:00
SamplerMinFilter.cs
SamplerMipFilter.cs
SamplerPool.cs Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
Texture.cs Account for negative strides on DMA copy (#2623) 2021-09-11 22:54:18 +02:00
TextureBindingInfo.cs
TextureBindingsManager.cs Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
TextureCache.cs Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
TextureCompatibility.cs Compare aligned size for largest mip level when considering sampler resize (#2306) 2021-05-24 17:35:26 +10:00
TextureComponent.cs
TextureDependency.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureDescriptor.cs Improve Buffer Textures and flush Image Stores (#2088) 2021-03-08 18:43:39 -03:00
TextureDescriptorType.cs
TextureGroup.cs Force copy when auto-deleting a texture with dependencies (#2687) 2021-09-29 02:11:05 +02:00
TextureGroupHandle.cs Force copy when auto-deleting a texture with dependencies (#2687) 2021-09-29 02:11:05 +02:00
TextureInfo.cs Texture Cache: "Texture Groups" and "Texture Dependencies" (#2001) 2021-03-02 19:30:54 -03:00
TextureManager.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
TextureMatchQuality.cs
TextureMsaaMode.cs
TexturePool.cs Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
TexturePoolCache.cs Initial support for separate GPU address spaces (#2394) 2021-06-29 19:32:02 +02:00
TextureScaleMode.cs Use "Undesired" scale mode for certain textures rather than blacklisting (#2537) 2021-08-11 22:44:51 +02:00
TextureSearchFlags.cs
TextureTarget.cs Fix TXQ for 3D textures. (#2613) 2021-09-02 00:17:43 -03:00
TextureViewCompatibility.cs