mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-20 16:35:25 +01:00
Improve shadow settings usability
This commit is contained in:
@@ -34,9 +34,9 @@ local function detect_mapping_idx()
|
||||
|
||||
local shadow_map_max_distance = tonumber(core.settings:get("shadow_map_max_distance"))
|
||||
local shadow_map_texture_size = tonumber(core.settings:get("shadow_map_texture_size"))
|
||||
local shadow_map_texture_32bit = core.settings:get_bool("shadow_map_texture_32bit", false)
|
||||
local shadow_map_texture_32bit = core.settings:get_bool("shadow_map_texture_32bit")
|
||||
local shadow_filters = tonumber(core.settings:get("shadow_filters"))
|
||||
local shadow_map_color = core.settings:get_bool("shadow_map_color", false)
|
||||
local shadow_map_color = core.settings:get_bool("shadow_map_color")
|
||||
|
||||
for i = 2, 6 do
|
||||
local preset = shadow_presets[i]
|
||||
@@ -81,8 +81,14 @@ return {
|
||||
table.remove(labels, PRESET_CUSTOM)
|
||||
end
|
||||
|
||||
-- Don't show anything if shadows are disabled
|
||||
-- Reason: there's a separate checkbox and users can't see the suggested default in the dropdown
|
||||
if idx == PRESET_DISABLED then
|
||||
return "", 0
|
||||
end
|
||||
|
||||
local fs =
|
||||
"label[0,0.2;" .. fgettext("Dynamic shadows") .. "]" ..
|
||||
"label[0,0.2;" .. fgettext("Quality preset") .. "]" ..
|
||||
"dropdown[0,0.4;3,0.8;dd_shadows;" .. table.concat(labels, ",") .. ";" .. idx .. ";true]" ..
|
||||
"label[0,1.5;" .. core.colorize("#bbb", fgettext("(The game will need to enable shadows as well)")) .. "]"
|
||||
return fs, 1.8
|
||||
|
||||
@@ -706,7 +706,7 @@ water_wave_speed (Waving liquids wave speed) float 5.0
|
||||
# Set to true to enable Shadow Mapping.
|
||||
#
|
||||
# Requires: shadows_support
|
||||
enable_dynamic_shadows (Dynamic shadows) bool false
|
||||
enable_dynamic_shadows (Enable dynamic shadows) bool false
|
||||
|
||||
# Set the shadow strength gamma.
|
||||
# Adjusts the intensity of in-game dynamic shadows.
|
||||
@@ -718,7 +718,7 @@ shadow_strength_gamma (Shadow strength gamma) float 1.0 0.1 10.0
|
||||
# Maximum distance to render shadows.
|
||||
#
|
||||
# Requires: enable_dynamic_shadows, shadows_support
|
||||
shadow_map_max_distance (Shadow map max distance in nodes to render shadows) float 140.0 10.0 1000.0
|
||||
shadow_map_max_distance (Shadow map render distance) float 140.0 10.0 1000.0
|
||||
|
||||
# Texture size to render the shadow map on.
|
||||
# This must be a power of two.
|
||||
|
||||
Reference in New Issue
Block a user