Luanti 5.19.0-dev
Loading...
Searching...
No Matches
lighting.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2021 x2048, Dmitry Kostenko <codeforsmile@gmail.com>
4
5#pragma once
6#include "irrlichttypes.h"
7#include "SColor.h"
8#include "irr_v3d.h"
9
10
43
44/*
45 * Describes the "static" lighting parameters for a player.
46 *
47 * The difference is that these are baked into the map block meshes and require
48 * more work to update.
49 */
51{
52 static constexpr int LIGHT_CURVE_SIZE = 16;
53
54 // Light curve: used to decode map light (0-15) into intensity (0-255)
55 bool light_curve_set = false;
57
58 // Ambient occlusion gamma
59 float ao_gamma = 1.8f;
60
61 bool operator==(const StaticLighting &other) const;
62 bool operator!=(const StaticLighting &other) const {
63 return !(*this == other);
64 }
65};
66
67/*
68 * Describes ambient light settings for a player
69 */
71{
73 float shadow_intensity {0.0f};
74 float saturation {1.0f};
76 video::SColor shadow_tint {255, 0, 0, 0};
77 float bloom_intensity {0.05f};
79 float bloom_radius {1.0f};
81
83};
core::vector3df v3f
Definition irr_v3d.h:11
Parameters for automatic exposure compensation.
Definition lighting.h:20
float luminance_max
Maximum boundary for computed luminance.
Definition lighting.h:24
float exposure_correction
Luminance bias. Higher values make the scene darker, can be negative.
Definition lighting.h:26
float speed_dark_bright
Speed of transition from dark to bright scenes.
Definition lighting.h:28
float luminance_min
Minimum boundary for computed luminance.
Definition lighting.h:22
float speed_bright_dark
Speed of transition from bright to dark scenes.
Definition lighting.h:30
float center_weight_power
Power value for center-weighted metering. Value of 1.0 measures entire screen uniformly.
Definition lighting.h:32
constexpr AutoExposure()
Definition lighting.h:34
Definition lighting.h:71
float volumetric_light_strength
Definition lighting.h:75
StaticLighting static_
Definition lighting.h:82
float bloom_radius
Definition lighting.h:79
float shadow_intensity
Definition lighting.h:73
float bloom_strength_factor
Definition lighting.h:78
float saturation
Definition lighting.h:74
video::SColor shadow_tint
Definition lighting.h:76
float bloom_intensity
Definition lighting.h:77
v3f shadow_direction
Definition lighting.h:80
AutoExposure exposure
Definition lighting.h:72
Definition lighting.h:51
float ao_gamma
Definition lighting.h:59
bool operator==(const StaticLighting &other) const
Definition lighting.cpp:9
static constexpr int LIGHT_CURVE_SIZE
Definition lighting.h:52
u8 light_curve[LIGHT_CURVE_SIZE]
Definition lighting.h:56
bool light_curve_set
Definition lighting.h:55
bool operator!=(const StaticLighting &other) const
Definition lighting.h:62