mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Add support for interlaced polarized 3d screens
Add (experimental) support for topbottom as well as sidebyside 3d mode
This commit is contained in:
parent
d9f6f9e7a8
commit
09970b7b6d
17 changed files with 910 additions and 424 deletions
|
@ -856,7 +856,7 @@ int ClientMap::getBackgroundBrightness(float max_d, u32 daylight_factor,
|
|||
return ret;
|
||||
}
|
||||
|
||||
void ClientMap::renderPostFx()
|
||||
void ClientMap::renderPostFx(CameraMode cam_mode)
|
||||
{
|
||||
INodeDefManager *nodemgr = m_gamedef->ndef();
|
||||
|
||||
|
@ -867,8 +867,6 @@ void ClientMap::renderPostFx()
|
|||
v3f camera_position = m_camera_position;
|
||||
m_camera_mutex.Unlock();
|
||||
|
||||
LocalPlayer *player = m_client->getEnv().getLocalPlayer();
|
||||
|
||||
MapNode n = getNodeNoEx(floatToInt(camera_position, BS));
|
||||
|
||||
// - If the player is in a solid node, make everything black.
|
||||
|
@ -876,7 +874,9 @@ void ClientMap::renderPostFx()
|
|||
// - Do not if player is in third person mode
|
||||
const ContentFeatures& features = nodemgr->get(n);
|
||||
video::SColor post_effect_color = features.post_effect_color;
|
||||
if(features.solidness == 2 && !(g_settings->getBool("noclip") && m_gamedef->checkLocalPrivilege("noclip")) && player->camera_mode == CAMERA_MODE_FIRST)
|
||||
if(features.solidness == 2 && !(g_settings->getBool("noclip") &&
|
||||
m_gamedef->checkLocalPrivilege("noclip")) &&
|
||||
cam_mode == CAMERA_MODE_FIRST)
|
||||
{
|
||||
post_effect_color = video::SColor(255, 0, 0, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue