diff options
| author | x2048 <codeforsmile@gmail.com> | 2023-01-06 22:33:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-06 22:33:25 +0100 |
| commit | 6d45c243f85942b20dab58753e735ec89a68f710 (patch) | |
| tree | bfe6207d73d1b111af82ea9e5794bdaac4ce26e3 /src/network | |
| parent | 2715cc8bf68a2cc8cd583cd5b0bb732ee13a1b49 (diff) | |
| download | minetest-6d45c243f85942b20dab58753e735ec89a68f710.tar.xz | |
Add dynamic exposure correction (#12959)
* Add uniform for frame delta time
* Adjust exposure in logarithmic (EV) space
* Add network support and LUA API
* Add testing mod
Diffstat (limited to 'src/network')
| -rw-r--r-- | src/network/clientpackethandler.cpp | 8 | ||||
| -rw-r--r-- | src/network/networkprotocol.h | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 829b1c3e6..0e6256356 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -1766,4 +1766,12 @@ void Client::handleCommand_SetLighting(NetworkPacket *pkt) *pkt >> lighting.shadow_intensity; if (pkt->getRemainingBytes() >= 4) *pkt >> lighting.saturation; + if (pkt->getRemainingBytes() >= 24) { + *pkt >> lighting.exposure.luminance_min + >> lighting.exposure.luminance_max + >> lighting.exposure.exposure_correction + >> lighting.exposure.speed_dark_bright + >> lighting.exposure.speed_bright_dark + >> lighting.exposure.center_weight_power; + } } diff --git a/src/network/networkprotocol.h b/src/network/networkprotocol.h index 01e65ef68..4e50ef533 100644 --- a/src/network/networkprotocol.h +++ b/src/network/networkprotocol.h @@ -831,6 +831,13 @@ enum ToClientCommand /* f32 shadow_intensity f32 saturation + exposure parameters + f32 luminance_min + f32 luminance_max + f32 exposure_correction + f32 speed_dark_bright + f32 speed_bright_dark + f32 center_weight_power */ TOCLIENT_NUM_MSG_TYPES = 0x64, |
