mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Reset player lighting when passing no arguments (#13525)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
This commit is contained in:
parent
b60d38b7f9
commit
d6eb6ff973
2 changed files with 29 additions and 24 deletions
|
@ -7676,8 +7676,9 @@ child will follow movement and rotation of that bone.
|
|||
the client already has the block)
|
||||
* Resource intensive - use sparsely
|
||||
* `set_lighting(light_definition)`: sets lighting for the player
|
||||
* Passing no arguments resets lighting to its default values.
|
||||
* `light_definition` is a table with the following optional fields:
|
||||
* `saturation` sets the saturation (vividness).
|
||||
* `saturation` sets the saturation (vividness; default: `1.0`).
|
||||
values > 1 increase the saturation
|
||||
values in [0,1) decrease the saturation
|
||||
* This value has no effect on clients who have the "Tone Mapping" shader disabled.
|
||||
|
@ -7686,12 +7687,12 @@ child will follow movement and rotation of that bone.
|
|||
* This value has no effect on clients who have the "Dynamic Shadows" shader disabled.
|
||||
* `exposure` is a table that controls automatic exposure.
|
||||
The basic exposure factor equation is `e = 2^exposure_correction / clamp(luminance, 2^luminance_min, 2^luminance_max)`
|
||||
* `luminance_min` set the lower luminance boundary to use in the calculation
|
||||
* `luminance_max` set the upper luminance boundary to use in the calculation
|
||||
* `exposure_correction` correct observed exposure by the given EV value
|
||||
* `speed_dark_bright` set the speed of adapting to bright light
|
||||
* `speed_bright_dark` set the speed of adapting to dark scene
|
||||
* `center_weight_power` set the power factor for center-weighted luminance measurement
|
||||
* `luminance_min` set the lower luminance boundary to use in the calculation (default: `-3.0`)
|
||||
* `luminance_max` set the upper luminance boundary to use in the calculation (default: `-3.0`)
|
||||
* `exposure_correction` correct observed exposure by the given EV value (default: `0.0`)
|
||||
* `speed_dark_bright` set the speed of adapting to bright light (default: `1000.0`)
|
||||
* `speed_bright_dark` set the speed of adapting to dark scene (default: `1000.0`)
|
||||
* `center_weight_power` set the power factor for center-weighted luminance measurement (default: `1.0`)
|
||||
|
||||
* `get_lighting()`: returns the current state of lighting for the player.
|
||||
* Result is a table with the same fields as `light_definition` in `set_lighting`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue