mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Visual Effects Vol. 1 (#14610)
This PR adds a variety of effects to enhance the visual experience. "soft" clouds look Tinted shadows Crude water reflections (sky and sun) and waves Translucent foliage Node specular highlights Adjusted fog color (more saturated where the fog is lighter) Minor changes to volumetric lighting (crudely simulates the effect of depth) Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
parent
4ac86db8e3
commit
d8f1daac25
24 changed files with 356 additions and 53 deletions
|
@ -1476,6 +1476,7 @@ void Client::handleCommand_CloudParams(NetworkPacket* pkt)
|
|||
f32 density;
|
||||
video::SColor color_bright;
|
||||
video::SColor color_ambient;
|
||||
video::SColor color_shadow = video::SColor(255, 204, 204, 204);
|
||||
f32 height;
|
||||
f32 thickness;
|
||||
v2f speed;
|
||||
|
@ -1483,6 +1484,10 @@ void Client::handleCommand_CloudParams(NetworkPacket* pkt)
|
|||
*pkt >> density >> color_bright >> color_ambient
|
||||
>> height >> thickness >> speed;
|
||||
|
||||
if (pkt->getRemainingBytes() >= 4) {
|
||||
*pkt >> color_shadow;
|
||||
}
|
||||
|
||||
ClientEvent *event = new ClientEvent();
|
||||
event->type = CE_CLOUD_PARAMS;
|
||||
event->cloud_params.density = density;
|
||||
|
@ -1491,6 +1496,7 @@ void Client::handleCommand_CloudParams(NetworkPacket* pkt)
|
|||
// we avoid using new() and delete() for no good reason
|
||||
event->cloud_params.color_bright = color_bright.color;
|
||||
event->cloud_params.color_ambient = color_ambient.color;
|
||||
event->cloud_params.color_shadow = color_shadow.color;
|
||||
event->cloud_params.height = height;
|
||||
event->cloud_params.thickness = thickness;
|
||||
// same here: deconstruct to skip constructor
|
||||
|
@ -1821,4 +1827,6 @@ void Client::handleCommand_SetLighting(NetworkPacket *pkt)
|
|||
}
|
||||
if (pkt->getRemainingBytes() >= 4)
|
||||
*pkt >> lighting.volumetric_light_strength;
|
||||
if (pkt->getRemainingBytes() >= 4)
|
||||
*pkt >> lighting.shadow_tint;
|
||||
}
|
||||
|
|
|
@ -229,10 +229,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
[bump for 5.9.1]
|
||||
PROTOCOL VERSION 46:
|
||||
Move default hotbar from client-side C++ to server-side builtin Lua
|
||||
Add shadow tint to Lighting packets
|
||||
Add shadow color to CloudParam packets
|
||||
[scheduled bump for 5.10.0]
|
||||
*/
|
||||
|
||||
#define LATEST_PROTOCOL_VERSION 46
|
||||
|
||||
#define LATEST_PROTOCOL_VERSION_STRING TOSTRING(LATEST_PROTOCOL_VERSION)
|
||||
|
||||
// Server's supported network protocol range
|
||||
|
@ -1176,4 +1179,4 @@ enum InteractAction : u8
|
|||
INTERACT_PLACE, // 3: place block or item (to abovesurface)
|
||||
INTERACT_USE, // 4: use item
|
||||
INTERACT_ACTIVATE // 5: rightclick air ("activate")
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue