CaffeineMC / sodium-fabric

A Fabric mod designed to improve frame rates and reduce micro-stutter
Other
4.58k stars 771 forks source link

Mod Compatability Bug: Industrial Revolution #2549

Open NolanHewitt opened 2 weeks ago

NolanHewitt commented 2 weeks ago

Bug Description

Sodium causes the fluids from the industrial revolution mod to display with the wrong colors. Someone on the mods discord said the mod uses a color map to re-texture the liquid from the mod and that its a rendering bug. This was tested on quilt, but I did make a fabric instance and the same issue also happens on fabric.

Correct Colors without Sodium:

indrev1

Incorrect Colors when using Sodium: Screenshot 2024-06-16 204218

Reproduction Steps

Start game using only industrial revolution and its requirements, liquids look fine. Install sodium and indium, and the liquids are now incorrectly colored

Log File

latest.log

Crash Report

crash-2024-06-16_20.51.36-client.txt

jellysquid3 commented 2 weeks ago

Probably caused by the color channels being flipped. This might be a bug in Indium...

jellysquid3 commented 1 week ago

I don't have my usual computer right now and can't look into this. But my suspicion is the problem is just color channels getting flipped (probably we wrongly interpret RGBA as ABGR somewhere). The easiest way to debug this would be to place a single fluid in an empty world, and place a breakpoint where vertices are being written to the chunk mesh. Working up the chain should allow someone to find where the wrong colors come from.

NolanHewitt commented 1 week ago

Thanks for the update! Possibly unrelated, but I noticed that fluids from mods (fluids which normally render as the correct color) render as the opposite of the color they’re supposed to be in distant horizons chunks, I wonder if that’s related? I know DH does a lot of rendering stuff for their LOD system so it might be completed unrelated to this, the issue just sounds similar to this one.