SlotMachineRenderTextureFix

版本 v1.0.0·更新於 2026-08-22

Fixes the Reel of Fortune (slot machine) display not rendering on high resolutions (>1440p). Clamps the 8x supersampled RenderTexture to the GPU's max texture size.

模組介紹 作者原文

SlotMachineRenderTextureFix

Fixes the Reel of Fortune slot machine display not rendering in How to Fish on high resolutions (>1858px screen height), on both Linux/Proton and Windows.

Cause

GameInfo.Awake() sizes the slot machine's RenderTexture as:

int value = (int)(Screen.height * 0.25f); // clamped to 1440

int num = (int)(value * 4.40625f);

_slotMachineTexture.width = num * 8; // up to 19032 px

_slotMachineTexture.height = value * 8;

At screen heights above ~1858px this exceeds the GPU hard limit (SystemInfo.maxTextureSize, typically 16384). RenderTexture.Create then fails silently every frame — you'll see this spamming the Unity log:

RenderTexture.Create failed: requested size (19032, 4320) is too large for the current maxRenderTextureSize(16384).

RenderPass: Unable to find surface for attachment 0

EndRenderPass: Not inside a Renderpass

The secondary camera that draws the reels (SlotMachine._slotCam.Render()) writes into a dead render target, so the display stays black / missing.

Fix

Harmony postfix on GameInfo.Awake clamps _slotMachineTexture proportionally to SystemInfo.maxTextureSize and re-creates it before the camera renders into it. Works at any resolution; no config.

Example at 4K: 19032×4320 → 16384×3720.

Install

Requires BepInExPack for How to Fish.

Drop SlotMachineFix.dll into BepInEx/plugins.

Verify

After launch, check BepInEx/LogOutput.log:

[Info:SlotMachineFix] SlotMachineFix loaded

[Warning:SlotMachineFix] Clamped slot RT 19032x4320 -> 16384x3720 (max 16384) Create=True

No more RenderTexture.Create failed spam in Player.log.

Build

dotnet build src/SlotMachineFix/SlotMachineFix.csproj -c Release

output: src/SlotMachineFix/bin/Release/netstandard2.1/SlotMachineFix.dll

Package./package.sh # builds, stages manifest+readme+dll+icon into dist, zips to dist/SlotMachineFix.zip

Repo layout

icon.svg source vector icon (256×256)

icon.png rendered icon (rsvg-convert)

manifest.json metadata (dependency: BepInEx-BepInExPack-5.4.2305)

README.md this file

package.sh build + package script

src/SlotMachineFix/ plugin project

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
SlotMachineRenderTextureFix-1.0.0.zip
檔案大小
12.3 KiB
SHA-256
d26ce203b7a68077aef7f48264cfbeaddc4b657cb3a3ae51ccfec0d7ecb87e4d
入庫時間
2026-10-12 00:48