t-affeldt / regional_weather

A diverse weather pack for Minetest using Climate API
https://forum.minetest.net/viewtopic.php?f=9&t=24569
Other
4 stars 2 forks source link

completely desaturates the world #10

Closed Lemente closed 1 week ago

Lemente commented 1 year ago

When using this mod and with shaders activated (MTG weather off), the world is almost completely desaturated. more info :

screenshot_20230514_205004

doing "/set_weather regional_weather:ambient off" solves the issue, but I assume it also removes some of the mod features. screenshot_20230514_210352

APercy commented 11 months ago

To fix it, change the function map_range at file "regional_weather/ca_weathers/ambient.lua", line 15, to this: `

-- maps range of 0 to 1 to any other range
local function map_range(val, low, high)
    local cal_val = math.min(math.max(val, 0), 1)
    local range = high - low
    return low + (cal_val * range)
end

`

t-affeldt commented 3 months ago

Hello! Sorry for the late reply as I don't have time for modding and as such, cannot offer much support.

This bug is caused by a misconfigured feature. I implemented it when shaders were still under development and then didn't correct for changes to them when they were officially released.

It is supposed to simulate diffused lighting conditions under overcast weather. Unfortunately, the values are set way too extreme, so that it appears either way too desaturated or way too saturated. I hadn't felt a need to make them configurable, so there is no easy way to fix it without changing something in the code. You can disable tone maps in your Minetest settings to disable the feature but it might affect other visual aspects.

For those willing to change two lines of code, you can tweak the values in ambient.lua to your liking (lines 30 and 37). More info on my forum post. I am willing to accept push requests if they come with screenshots.

t-affeldt commented 1 week ago

This is now fixed in the latest version. :)