idontknowlmao-SlotMachineRenderTextureFix icon

SlotMachineRenderTextureFix

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.

Last updated 4 hours ago
Total downloads 95
Total rating 0 
Categories Mods Misc
Dependency string idontknowlmao-SlotMachineRenderTextureFix-1.0.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2305 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2305

README

SlotMachineRenderTextureFix

Thunderstore Requires BepInEx

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 for Thunderstore

./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       Thunderstore metadata (dependency: BepInEx-BepInExPack-5.4.2305)
README.md           this file
package.sh          build + package script
src/SlotMachineFix/ plugin project