ryujinx/Ryujinx.Graphics.Gpu/Engine/Threed
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
..
ConditionalRendering.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ConstantBufferUpdater.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
DrawManager.cs Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
DrawState.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
IbStreamer.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
SemaphoreUpdater.cs Add a Multithreading layer for the GAL, multi-thread shader compilation at runtime (#2501) 2021-08-27 00:31:29 +02:00
StateUpdater.cs Initial tessellation shader support (#2534) 2021-10-18 18:38:04 -03:00
StateUpdateTracker.cs Separate GPU engines (part 2/2) (#2440) 2021-07-11 17:20:40 -03:00
ThreedClass.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
ThreedClassState.cs Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00