# How to Contribute to RenoDX: A Complete Guide for DirectX Mod Developers

> Learn how to contribute to the RenoDX project. Follow our guide to clone the repo, set up your dev environment, and build targets for DirectX mod development.

- Repository: [Carlos Lopez/renodx](https://github.com/clshortfuse/renodx)
- Tags: how-to-guide
- Published: 2026-09-06

---

**To contribute to renodx, clone the repository with submodules, run the `setup-dev-env.ps1` PowerShell script to bootstrap required compilers, and build targets using CMake presets such as `clang-x64` or `vs-x64`.**

RenoDX is a modular engine for creating DirectX game mods built on the ReShade Add-on API. Before you contribute to renodx, you should understand its CMake-driven architecture, shader compilation pipeline, and the specific development tools required to build the addon binaries and live-inspection devkit.

## Understanding RenoDX Architecture Before You Contribute

Before writing code, familiarize yourself with how the repository organizes its build system, shader pipeline, and addon generation logic.

### Core Build System and Tool Discovery

The top-level [`CMakeLists.txt`](https://github.com/clshortfuse/renodx/blob/main/CMakeLists.txt) serves as the central nervous system of the project. It automatically discovers required compiler binaries—including FXC, DXC, Slang, and glslang—and creates helper executables such as `embed_file`, `analyze_shader_deps`, `decomp`, and `mcp_bridge`. These utilities handle resource embedding, shader dependency analysis, and development bridge functionality.

### Shader Compilation Pipeline

Shader source files reside under `src/games/<game>/` and follow a strict naming convention: `{CRC32}.{TARGET}.hlsl`. The CMake logic parses these filenames to extract hash identifiers and compilation targets. During the build process, sources are compiled to either legacy FXC bytecode (`.cso`) or modern DXC/SPIR-V output (`.spv`) using compiler-specific flags. The `embed_file` utility then packages these compiled binaries as header files for embedding into the final addon.

### Addon Generation Logic

For every game folder under `src/games/`, CMake generates a corresponding addon target named `renodx-<game>.addon64` or `renodx-<game>.addon32` (for 32-bit builds). The build combines your [`addon.cpp`](https://github.com/clshortfuse/renodx/blob/main/addon.cpp) source files with a generated Windows resource file (created via `generate_resource_rc`) that supplies version information and metadata required by the ReShade Add-on API.

### Devkit and Utility Infrastructure

The live-inspection devkit consists of two primary components built from `src/apps` and `src/devkit`: the `devkit` binary (an in-game inspection addon) and `mcp_bridge` (a bridge process exposing devkit data to external MCP clients). Shared functionality lives in `src/utils/`, which provides lightweight C++ helpers for windowing, vtable manipulation, tracing, swapchain handling, and shader management used across all addons.

## Setting Up Your RenoDX Development Environment

Proper environment setup is critical before you can successfully contribute to renodx and compile the shader pipeline.

### Required Prerequisites

Install the recommended development toolchain: VSCode, MSVC 2022 Build Tools, CMake, Ninja, LLVM, Windows SDK version 10.0.26100.0 or later, glslang, DirectXShaderCompiler, and Slang C. The complete list and version requirements are documented in [`docs/CONTRIBUTING.md`](https://github.com/clshortfuse/renodx/blob/main/docs/CONTRIBUTING.md).

### Repository Initialization

Clone the repository and initialize all submodules to fetch external dependencies including the ReShade headers:

```powershell
git clone https://github.com/clshortfuse/renodx.git
cd renodx
git submodule update --init --recursive

```

### Bootstrapping the Toolchain

Run the provided PowerShell script to download and configure required binaries into the `./bin` directory. The script supports flags such as `-Install`, `-Update`, and `-Tools` to customize the setup process:

```powershell
powershell -ExecutionPolicy Bypass -File .\scripts\setup-dev-env.ps1 -Install

```

Verify your installation by checking tool versions:

```powershell
cmake -P .\cmake\tool-versions.cmake

```

## Building Targets and Testing Your Changes

Once configured, use CMake presets to maintain consistent build environments across different contributor machines.

### Configuring CMake Presets

RenoDX provides presets for both Clang and Visual Studio toolchains. Select a preset that matches your installed compiler:

```powershell

# For Clang/LLVM

cmake --preset clang-x64

# For Visual Studio

cmake --preset vs-x64

```

### Building Release and Debug Targets

Build the full project or specific targets using the configured preset:

```powershell

# Full release build of all game addons

cmake --build --preset clang-x64-release

# Debug build of devkit and bridge only

cmake --build --preset clang-x64-debug --target devkit mcp_bridge

```

To build a specific game mod after creating your source files:

```powershell
cmake --build --preset clang-x64-release --target renodx-mygame.addon64

```

### Running Regression Tests

If you enable the `RENODX_BUILD_TESTS` option, the repository includes regression tests for swapchain and render-pass behavior. Build and execute tests using:

```powershell
cmake --build --preset clang-x64-debug --target test
ctest --preset clang-x64-debug

```

## RenoDX Contribution Workflow for New Mods

The standard workflow for adding new functionality follows a predictable path from template creation to pull request.

### Creating a New Game Mod

To add support for a new game, copy the template folder `src/games/generic` to a new directory named after your target game (e.g., `src/games/mygame`). Create or modify HLSL/SLANG shader files following the `{CRC32}.{TARGET}.hlsl` naming scheme, and implement your addon logic in [`addon.cpp`](https://github.com/clshortfuse/renodx/blob/main/addon.cpp). The CMake system automatically detects the new folder and generates the corresponding addon binary target without requiring manual build file edits.

### Submitting Your Contribution

Fork the repository, create a feature branch, and ensure your changes pass the continuous integration pipelines (GitHub Actions for Clang, Ninja, and Visual Studio). Commit messages should follow conventional commit style. Open a pull request against the `main` branch, ensuring you have tested both debug and release builds of your addon targets.

## Summary

- **Key Configuration Files**: The [`CMakeLists.txt`](https://github.com/clshortfuse/renodx/blob/main/CMakeLists.txt) manages tool discovery and target generation, while [`docs/CONTRIBUTING.md`](https://github.com/clshortfuse/renodx/blob/main/docs/CONTRIBUTING.md) contains the authoritative setup guide.
- **Shader Pipeline**: Files in `src/games/<game>/` use `{CRC32}.{TARGET}.hlsl` naming and compile to embedded `.cso` or `.spv` binaries via `embed_file`.
- **Build Process**: Use `scripts/setup-dev-env.ps1` to bootstrap tools, then configure with `cmake --preset <preset>` and build with `cmake --build --preset <preset>-release`.
- **Testing**: Enable `RENODX_BUILD_TESTS` and run `ctest` to validate swapchain and rendering behavior.
- **Entry Points**: Reference [`src/games/generic/addon.cpp`](https://github.com/clshortfuse/renodx/blob/main/src/games/generic/addon.cpp) for mod templates and [`src/apps/mcp_bridge/main.cpp`](https://github.com/clshortfuse/renodx/blob/main/src/apps/mcp_bridge/main.cpp) for bridge functionality.

## Frequently Asked Questions

### What are the minimum system requirements to contribute to renodx?

You need Windows with the Windows SDK version 10.0.26100.0 or later, MSVC 2022 Build Tools, CMake, Ninja, and LLVM. The `scripts/setup-dev-env.ps1` script automatically downloads specialized compilers like DirectXShaderCompiler, Slang C, and glslang if they are not present in your `PATH`.

### How do I compile shaders for a new game mod?

Place your HLSL files in `src/games/<game>/` using the `{CRC32}.{TARGET}.hlsl` naming convention. The CMake system automatically routes these files through the appropriate compiler (FXC for legacy bytecode, DXC for SPIR-V) and embeds the results using the `embed_file` utility. No manual shader compilation steps are required.

### What is the mcp_bridge utility used for in renodx development?

The `mcp_bridge` binary, built from [`src/apps/mcp_bridge/main.cpp`](https://github.com/clshortfuse/renodx/blob/main/src/apps/mcp_bridge/main.cpp), acts as a bridge process that exposes live devkit data to external MCP (Model Context Protocol) clients. It runs as a separate process listening on localhost, allowing external tools to inspect render state and shader information while the game is running with the devkit addon injected.

### How do I enable and run tests in the renodx build system?

Configure CMake with the `RENODX_BUILD_TESTS` option enabled, then build the `test` target and run `ctest` with your chosen preset. This executes regression tests validating swapchain behavior and render-pass logic to ensure your changes do not break existing functionality.