1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 19:46:38 +00:00
Ryujinx/Ryujinx.Graphics.Gpu/Engine
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
..
Compute Initial tessellation shader support (#2534) 2021-10-18 18:38:04 -03:00
Dma Account for negative strides on DMA copy (#2623) 2021-09-11 22:54:18 +02:00
GPFifo Add support for HLE macros and accelerate MultiDrawElementsIndirectCount #2 (#2557) 2021-08-26 23:50:28 +02:00
InlineToMemory Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
MME Handle indirect draw counts with non-zero draw starts properly (#2593) 2021-08-29 16:52:38 -03:00
Threed Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
Twod Don't force scaling on 2D copy sources (#2701) 2021-10-12 23:12:17 +02:00
Types Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ConditionalRenderEnabled.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
DeviceStateWithShadow.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
MmeShadowScratch.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
SetMmeShadowRamControlMode.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ShaderTexture.cs Fix image binding format (#1625) 2020-10-20 19:03:20 -03:00