REPOTrueUltrawide
Ultrawide without stretching.
About this mod Author’s original text
True Ultrawide Mod
This is only current mod that gives ultrawide without that awful stretching. It works by removing the black bars and then changing the vertical FOV (which is more complicated than it should be). I have only tested this on 32:9. If 21:9 looks bad, compile it yourself and change the FOV. Finally, I have taken the creative liberty to remove the post processing.
Source code:
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using UnityEngine;
namespace REPOTrueUltrawide
{
[BepInPlugin("REPOTrueUltrawide", "REPO True Ultrawide", "1.0.0")]
public class REPOTrueUltrawidePlugin: BaseUnityPlugin
{
public static ConfigEntry BaseFov;
private void Awake()
{
Logger.LogInfo("REPO True Ultrawide v1.0.0 loaded!");
Logger.LogInfo($"Aspect ratio: {(float)Screen.width / (float)Screen.height}");
BaseFov = Config.Bind(
"FOV",
"FOV",
70f,
new ConfigDescription(
"The FOV, 90 is good for 32:9.",
new AcceptableValueRange(50f, 110f)
)
);
Harmony harmony = new Harmony("REPOTrueUltrawide");
harmony.PatchAll();
}
}
[HarmonyPatch(typeof(GraphicsManager), "Update")]
public class StretchingPatch
{
public static void Postfix()
{
float aspectRatio = (float)Screen.width / (float)Screen.height;
var rto = GameObject.Find("Render Texture Overlay");
var rtm = GameObject.Find("Render Texture Main");
// Remove Black Bars!
if (rto && rtm)
{
var rtort = rto.GetComponent();
var rtmrt = rtm.GetComponent();
if (rtort && rtmrt)
{
rtort.sizeDelta = new Vector2(428 * aspectRatio, 428);
rtmrt.sizeDelta = new Vector2(428 * aspectRatio, 428);
}
else
{
rtort.sizeDelta = new Vector2(750, 750 / aspectRatio);
rtmrt.sizeDelta = new Vector2(750, 750 / aspectRatio);
}
}
// Fix Vertical FOV!
Camera mainCamera = GameDirector.instance.MainCamera;
float baseFOV = REPOTrueUltrawidePlugin.BaseFov.Value;
float correctedFOV = 2f * Mathf.Atan(
Mathf.Tan(baseFOV Mathf.Deg2Rad / 2f) (16f / 9f) / aspectRatio
) * Mathf.Rad2Deg;
mainCamera.aspect = aspectRatio;
mainCamera.fieldOfView = correctedFOV;
// DESTROY POST PROCESSING
var postprocessing = GameObject.Find("Post Processing Overlay");
if (postprocessing)
postprocessing.SetActive(false);
}
}
}
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: