1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-18 21:56:40 +00:00
Experimental Nintendo Switch Emulator written in C#
Find a file
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
.github frontend: Add a SDL2 headless window (#2310) 2021-07-06 22:08:44 +02:00
ARMeilleure Add an early TailMerge pass (#2721) 2021-10-18 19:51:22 -03:00
Ryujinx Fix direct mouse access checkbox label (#2827) 2021-11-10 15:21:51 -03:00
Ryujinx.Audio amadeus: Update to REV10 (#2654) 2021-09-19 12:29:19 +02:00
Ryujinx.Audio.Backends Haydn: Part 1 (#2007) 2021-02-26 01:11:56 +01:00
Ryujinx.Audio.Backends.OpenAL Implement a "Pause Emulation" option & hotkey (#2428) 2021-09-11 22:08:25 +02:00
Ryujinx.Audio.Backends.SDL2 Implement a "Pause Emulation" option & hotkey (#2428) 2021-09-11 22:08:25 +02:00
Ryujinx.Audio.Backends.SoundIo Implement a "Pause Emulation" option & hotkey (#2428) 2021-09-11 22:08:25 +02:00
Ryujinx.Common hle: Make Ryujinx.HLE project entirely safe (#2789) 2021-11-01 19:38:13 -03:00
Ryujinx.Cpu Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
Ryujinx.Graphics.Device NVDEC (H264): Use separate contexts per channel and decode frames in DTS order (#2671) 2021-09-29 00:43:40 +02:00
Ryujinx.Graphics.GAL Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
Ryujinx.Graphics.Gpu Limit Custom Anisotropic Filtering to mipmapped textures with many levels (#2832) 2021-11-13 16:04:21 -03:00
Ryujinx.Graphics.Host1x NVDEC (H264): Use separate contexts per channel and decode frames in DTS order (#2671) 2021-09-29 00:43:40 +02:00
Ryujinx.Graphics.Nvdec nvdec: Adding Vp8 codec support (#2707) 2021-10-12 22:55:57 +02:00
Ryujinx.Graphics.Nvdec.FFmpeg nvdec: Adding Vp8 codec support (#2707) 2021-10-12 22:55:57 +02:00
Ryujinx.Graphics.Nvdec.Vp9 Enable multithreaded VP9 decoding (#2009) 2021-02-11 01:54:42 +01:00
Ryujinx.Graphics.OpenGL Implement DrawTexture functionality (#2747) 2021-11-10 15:37:49 -03:00
Ryujinx.Graphics.Shader Support shader gl_Color, gl_SecondaryColor and gl_TexCoord built-ins (#2817) 2021-11-08 13:18:46 -03:00
Ryujinx.Graphics.Texture Account for negative strides on DMA copy (#2623) 2021-09-11 22:54:18 +02:00
Ryujinx.Graphics.Vic Added support for Pixel Format X8B8G8R8 (#2716) 2021-10-07 18:41:02 -03:00
Ryujinx.Graphics.Video nvdec: Adding Vp8 codec support (#2707) 2021-10-12 22:55:57 +02:00
Ryujinx.Headless.SDL2 Inline software keyboard without input pop up dialog (#2180) 2021-10-12 21:54:21 +02:00
Ryujinx.HLE Ensure syncpoints are released and event handles closed on channel close (#2812) 2021-11-04 20:27:21 -03:00
Ryujinx.Input Implement vibrations (#2468) 2021-08-05 00:39:40 +02:00
Ryujinx.Input.SDL2 Implement vibrations (#2468) 2021-08-05 00:39:40 +02:00
Ryujinx.Memory kernel: Clear pages allocated with SetHeapSize (#2776) 2021-10-24 18:52:59 -03:00
Ryujinx.Memory.Tests Replace CacheResourceWrite with more general "precise" write (#2684) 2021-09-29 02:27:03 +02:00
Ryujinx.SDL2.Common sdl2: Update to Ryujinx.SDL2-CS 2.0.17 (#2553) 2021-08-26 22:26:28 +02:00
Ryujinx.ShaderTools Rewrite shader decoding stage (#2698) 2021-10-12 22:35:31 +02:00
Ryujinx.Tests amadeus: Update to REV10 (#2654) 2021-09-19 12:29:19 +02:00
Ryujinx.Tests.Unicorn Add Linux Unicorn patch + desc. (#2609) 2021-09-15 01:47:10 +02:00
.editorconfig Adding .editorconfig so code style can be consistent and localized (#1131) 2020-05-03 00:58:58 +02:00
.gitattributes aloha 2018-02-04 20:08:20 -03:00
.gitignore Implement ContentManager and related services (#438) 2018-11-18 17:37:41 -02:00
appveyor.yml ci: Disable macOS x64 build on AppVeyor (#2795) 2021-10-29 15:07:31 +02:00
global.json Edit the global.json to allow use of dotnet sdk 5.0.XXX (#2008) 2021-02-10 09:37:19 +01:00
LICENSE.txt Update license (#788) 2019-10-12 23:48:31 -03:00
README.md Quick README update for game compatibility. (#2694) 2021-09-28 23:26:45 +02:00
Ryujinx.sln nvdec: Adding Vp8 codec support (#2707) 2021-10-12 22:55:57 +02:00
Ryujinx.sln.DotSettings Add features to GUI (#757) 2019-11-29 15:32:51 +11:00

Ryujinx

An experimental Switch emulator written in C#

As of September 2021, Ryujinx has been tested on nearly 3,400 titles: ~3,000 boot past menus and into gameplay, with approximately 2,400 of those being considered playable. See the compatibility list here.

Usage

To run this emulator, we recommend that your PC have at least 8GB of RAM; less than this amount can result in unpredictable behavior and may cause crashes or unacceptable performance.

See our Setup & Configuration Guide on how to set up the emulator.

Latest build

These builds are compiled automatically for each commit on the master branch. While we strive to ensure optimal stability and performance prior to pushing an update, our automated builds may be unstable or completely broken.

The latest automatic build for Windows, macOS, and Linux can be found on the Official Website.

Building

If you wish to build the emulator yourself you will need to:

Step one: Install the X64 version of .NET 5.0 (or higher) SDK.

Step two (choose one):
(Variant one)

After the installation of the .NET SDK is done; go ahead and copy the Clone link from GitHub from here (via Clone or Download --> Copy HTTPS Link. You can Git Clone the repo by using Git Bash or Git CMD.

(Variant two):

Download the ZIP Tarball. Then extract it to a directory of your choice.

Step three:

Build the App using a Command prompt in the project directory. You can quickly access it by holding shift in explorer (in the Ryujinx directory) then right clicking, and typing the following command:
Run dotnet build -c Release inside the Ryujinx project folder to build Ryujinx binaries.

Ryujinx system files are stored in the Ryujinx folder. This folder is located in the user folder, which can be accessed by clicking Open Ryujinx Folder under the File menu in the GUI.

Features

  • Audio

    Audio output is entirely supported, audio input (microphone) isn't supported. We use C# wrappers for OpenAL, and SDL2 & libsoundio as fallbacks.

  • CPU

    The CPU emulator, ARMeilleure, emulates an ARMv8 CPU and currently has support for most 64-bit ARMv8 and some of the ARMv7 (and older) instructions, including partial 32-bit support. It translates the ARM code to a custom IR, performs a few optimizations, and turns that into x86 code.
    There are three memory manager options available depending on the user's preference, leveraging both software-based (slower) and host-mapped modes (much faster). The fastest option (host, unchecked) is set by default. Ryujinx also features an optional Profiled Persistent Translation Cache, which essentially caches translated functions so that they do not need to be translated every time the game loads. The net result is a significant reduction in load times (the amount of time between launching a game and arriving at the title screen) for nearly every game. NOTE: this feature is enabled by default in the Options menu > System tab. You must launch the game at least twice to the title screen or beyond before performance improvements are unlocked on the third launch! These improvements are permanent and do not require any extra launches going forward.

  • GPU

    The GPU emulator emulates the Switch's Maxwell GPU using the OpenGL API (version 4.5 minimum) through a custom build of OpenTK. There are currently four graphics enhancements available to the end user in Ryujinx: disk shader caching, resolution scaling, aspect ratio adjustment and anisotropic filtering. These enhancements can be adjusted or toggled as desired in the GUI.

  • Input

    We currently have support for keyboard, mouse, touch input, JoyCon input support, and nearly all controllers. Motion controls are natively supported in most cases; for dual-JoyCon motion support, DS4Windows or BetterJoy are currently required. In all scenarios, you can set up everything inside the input configuration menu.

  • DLC & Modifications

    Ryujinx is able to manage add-on content/downloadable content through the GUI. Mods (romfs, exefs, and runtime mods such as cheats) are also supported; the GUI contains a shortcut to open the respective mods folder for a particular game.

  • Configuration

    The emulator has settings for enabling or disabling some logging, remapping controllers, and more. You can configure all of them through the graphical interface or manually through the config file, Config.json, found in the user folder which can be accessed by clicking Open Ryujinx Folder under the File menu in the GUI.

Compatibility

You can check out the compatibility list here. Anyone is free to submit an updated test on an existing game entry; simply follow the new issue template and testing guidelines, and post as a reply to the applicable game issue.

Don't hesitate to open a new issue if a game isn't already on there!

Help

If you are having problems launching homebrew or a particular game marked status-playable or status-ingame in our compatibility list, you can contact us through our Discord server. We'll take note of whatever is causing the app/game to not work, put it on the watch list and fix it at a later date.

If you need help with setting up Ryujinx, you can ask questions in the #support channel of our Discord server.

Contact

If you have contributions, need support, have suggestions, or just want to get in touch with the team, join our Discord server!

If you'd like to donate, please take a look at our Patreon.

License

This software is licensed under the terms of the MIT license. The Ryujinx.Audio project is licensed under the terms of the LGPLv3 license. This project makes use of code authored by the libvpx project, licensed under BSD and the ffmpeg project, licensed under LGPLv3. See LICENSE.txt and THIRDPARTY.md for more details.

Credits