MehVahdJukaar / polytone

Other
31 stars 2 forks source link

Fog colors are incorrect when using resource packs with OptiFine fog colormaps #54

Open REMDRIFT opened 2 weeks ago

REMDRIFT commented 2 weeks ago

Polytone makes fog colors darker than they should be when using resource packs that have OptiFine fog colormaps.

The two versions I looked at where this occurs are 1.20.6-2.0.2 (Fabric) and 1.20-2.0.4 (Fabric). Here is a link to one of the packs where this occurs: https://github.com/PoeticRainbow/golden-days (the version of the pack I used is "Golden Days Base")

Here is a comparison between OptiFine and Polytone (no other mods included): opt_v_poly

MehVahdJukaar commented 2 weeks ago

that snow block there is a different color too sosomething else is definitely play. Did you have any shader on? Pretty sure that is the case. Polytone simply assigns the color value to its biome, there arent any color manipulation done there at all. what the game does with the color is just vanilla logic then after so i doubt its something i should change. And even if optifine did some magic with those colors, altering or altering the fog renderer, it would not be my job to follow that (first because its impossible as its close source), secondly because the legacy compat layer is not the primary scope of the mod, not even the sondary as we are trying to build a better system, that, for instance in this example, would not make arbitrary color manipulations with the given colors from the texture

REMDRIFT commented 2 weeks ago

I took these screenshots in a fresh instance of Minecraft. All settings are at their defaults, and there are no shaders. The only mods used were Optifine, Polytone and Fabric API. I did several tests and I believe this is an issue with Polytone itself.

I noticed that the snow is brighter when using OptiFine; this is unrelated to the issue of fog being incorrect in Polytone. OptiFine makes all terrain slightly brighter compared to Vanilla/Fabric (I assume it is either a bug or an unintentional side effect caused by one of the mod's optimizations).

Upon closer inspection I also see that the color of the sky slightly differs between OptiFine and Polytone (it is a slightly more vibrant purple in OptiFine). I understand that legacy compat is not the primary scope, but I do not really see the point of it existing if the colors are going to be incorrect. The dark fog is incredibly jarring. But I understand if you think it's not worth it to deal with the issue.

REMDRIFT commented 2 weeks ago

And just to clarify, I am not implying that it is strictly an issue with Polytone, as you said that what the game does with the color is handled by vanilla logic. If that is the case, then the issue is that Polytone does not compensate for this to make the colors consistent with OptiFine.

MehVahdJukaar commented 2 weeks ago

Yeah but you know that optfine had a built-in shader that look very much like normal but is a bit different, tent to make things brighter. Disable that and test again

REMDRIFT commented 2 weeks ago

The built in OptiFine shaders (named "internal") were already disabled when I took the screenshots; my shaders are set to "OFF" in the menu. It seems fog is just brighter in OptiFine regardless of the settings. I am quite confident that the fog color in the OptiFine screenshots is how it is intended to look.

Comparison image: comparison

MehVahdJukaar commented 2 weeks ago

so theres not much i can do here. My code replaces the biome sky color lookup that vanilla does with a color picked directly from colormap without any other postprocessing. If optifine happens to do some other obscure thing here theres not much i can do because the mod is close source so I cant look at its code and even if it wasnt i would still not do it as mine would be more correct. I see that that fog color there for example is quite dark tho, thats a bit unusual as one should choose a bright color for their for colors so i will try it out and see if stuff adds up. Still its likely optifine fog is just artificially made brighter

REMDRIFT commented 2 weeks ago

Alright, thank you for your time. I understand if it ends up not being fixed.