Skip to main content
Ryujinx emulates the Nintendo Switch’s NVIDIA Maxwell GPU architecture, translating GPU commands and shaders to modern graphics APIs that run on your PC’s graphics card.

Graphics API Support

Ryujinx supports multiple graphics backends, allowing you to choose the best option for your system:

Vulkan

Recommended - Best performance and compatibility on most systems

OpenGL

Fallback option with broad hardware support (requires 4.5+)

Metal

macOS support via MoltenVK translation layer
Vulkan is the recommended backend for Windows and Linux systems, offering the best performance and feature support.

Maxwell GPU Architecture

The Nintendo Switch uses NVIDIA’s Maxwell GPU architecture (similar to GTX 900 series). Ryujinx emulates:

Graphics Pipeline

  • 3D Engine: Full emulation of the Tegra X1’s 3D graphics engine
  • 2D Engine: Hardware-accelerated 2D operations and texture copies
  • DMA Engine: Direct Memory Access for efficient data transfer
  • Compute Shaders: Support for GPU compute operations

Rendering Features

Deferred Rendering

Support for modern deferred shading techniques

Tessellation

Hardware tessellation for detailed geometry

Transform Feedback

GPU-side geometry processing

Compute Pipeline

General-purpose GPU computing

Shader Translation

One of Ryujinx’s most critical components is its shader translation system:

Shader Pipeline

  1. Maxwell Shader Code → Switch games use proprietary NVIDIA shader binaries
  2. Intermediate Representation → Translated to a custom IR for analysis
  3. GLSL/SPIR-V Output → Converted to industry-standard shader languages
  4. Host GPU Compilation → Your GPU driver compiles to native instructions
Ryujinx includes sophisticated shader optimization passes that can sometimes produce better-performing code than the original game shaders.

Shader Types Supported

Shader StageDescription
VertexGeometry processing and transformation
Tessellation ControlTessellation factor computation
Tessellation EvaluationTessellated vertex generation
GeometryPrimitive manipulation and generation
FragmentPer-pixel color and effects
ComputeGeneral-purpose GPU computation

Translation Features

// From ShaderCache.cs
public const TranslationFlags DefaultFlags = TranslationFlags.DebugMode;
The shader translator supports:
  • SSA Optimization: Static Single Assignment form for better optimization
  • Constant Folding: Compile-time evaluation of constant expressions
  • Dead Code Elimination: Removal of unused instructions
  • Bindless Textures: Advanced texture access patterns
  • Transform Optimization: Geometry shader to compute shader conversion when beneficial

Disk Shader Cache

Disk Shader Cache

Compiled shaders are cached to disk, eliminating stuttering on subsequent runs
How it works:
  • First run: Shaders compile on-demand, may cause brief stutters
  • Cached runs: Pre-compiled shaders load instantly from disk
  • Game updates: Cache automatically invalidates when game version changes
The shader cache is stored per-game in [RyujinxFolder]/games/[TitleID]/cache/shader/

Texture Emulation

Ryujinx supports the Switch’s diverse texture formats:

Texture Compression

FormatDescription
BC1-BC7Desktop-standard block compression
ASTCAdaptive Scalable Texture Compression (Switch native)
ETC2Ericsson Texture Compression
Texture Recompression: When enabled, Ryujinx can recompress incompatible formats to ones your GPU supports natively, improving performance.

Block Linear Layout

The Switch uses NVIDIA’s block-linear (tiled) texture layout for optimal GPU cache usage. Ryujinx handles:
  • Layout Conversion: Automatic conversion between linear and block-linear formats
  • GOB (Group of Bytes): NVIDIA’s texture tiling unit
  • Swizzling: Efficient texture data reorganization

Graphics Configuration

Ryujinx exposes several GPU configuration options:
// From GraphicsConfig.cs
public static float ResScale { get; set; } = 1f;
public static float MaxAnisotropy { get; set; } = -1;
public static bool EnableShaderCache { get; set; }
public static bool FastGpuTime { get; set; } = true;

Performance Options

Fast GPU Time

Simulates instant GPU processing to avoid resolution drops in performance-sensitive games

Fast 2D Copy

Uses CPU for 2D texture copies when faster than GPU

Macro JIT

Just-In-Time compilation of GPU macro code

Macro HLE

High-level emulation of common GPU macros

Vulkan Backend

The Vulkan backend offers the best performance:

Vulkan Advantages

  • Lower CPU Overhead: More efficient command submission
  • Better Multi-threading: Parallel command buffer recording
  • Modern Features: Latest GPU capabilities
  • SPIR-V Support: Native shader format, no GLSL parsing

Vulkan Extensions Used

ExtensionPurpose
EXT_conditional_renderingPredicated rendering
EXT_extended_dynamic_stateReduced pipeline state changes
KHR_push_descriptorEfficient descriptor updates
EXT_transform_feedbackGeometry shader output capture
KHR_draw_indirect_countGPU-driven rendering

OpenGL Backend

The OpenGL backend provides broad compatibility:

Requirements

  • Minimum Version: OpenGL 4.5
  • Core Profile: Modern OpenGL without legacy features
  • Extensions: Various extensions for optimal performance
OpenGL 4.5 was released in 2014, so most graphics cards from the last decade support it.

Metal/macOS Support

Metal via MoltenVK

macOS users can run Ryujinx through the MoltenVK translation layer, which converts Vulkan calls to Metal
While functional, Metal/macOS support may have:
  • Slightly lower performance than native Windows/Linux
  • Some graphics quirks due to translation layer
  • Limited to Apple Silicon and Intel Macs with Metal support

Graphics Enhancements

Ryujinx includes several graphical enhancements beyond native Switch capabilities:

Graphics Enhancements

Explore resolution scaling, anti-aliasing, and more enhancement options

Technical Implementation

Key source directories:
  • GPU Core: src/Ryujinx.Graphics.Gpu/
  • Shader Translation: src/Ryujinx.Graphics.Shader/
  • Vulkan Backend: src/Ryujinx.Graphics.Vulkan/
  • OpenGL Backend: src/Ryujinx.Graphics.OpenGL/
  • Texture Handling: src/Ryujinx.Graphics.Texture/
The GPU emulation system handles thousands of draw calls per frame while maintaining the illusion of perfect hardware emulation.

Troubleshooting

  • Try switching between Vulkan and OpenGL
  • Update your GPU drivers
  • Disable resolution scaling temporarily
  • Check that your GPU supports the required features
  • This is normal on first run
  • Let the game build its shader cache
  • Subsequent runs will be smooth
  • Consider pre-loading shader caches if available
  • Disable texture recompression
  • Try the OpenGL backend if using Vulkan
  • Report the issue with details for investigation

Build docs developers (and LLMs) love