summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/audio/audio_driver_dummy.cpp2
-rw-r--r--servers/audio_server.cpp6
-rw-r--r--servers/physics/space_sw.cpp2
-rw-r--r--servers/physics/space_sw.h2
-rw-r--r--servers/physics_2d/broad_phase_2d_hash_grid.cpp2
-rw-r--r--servers/physics_2d/physics_2d_server_sw.cpp4
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.cpp12
-rw-r--r--servers/physics_2d/physics_2d_server_wrap_mt.h2
-rw-r--r--servers/physics_2d/space_2d_sw.h2
-rw-r--r--servers/register_server_types.cpp12
-rw-r--r--servers/visual/shader_types.cpp3
-rw-r--r--servers/visual/visual_server_raster.cpp2
-rw-r--r--servers/visual/visual_server_viewport.cpp4
-rw-r--r--servers/visual/visual_server_wrap_mt.cpp4
-rw-r--r--servers/visual_server.cpp39
15 files changed, 64 insertions, 34 deletions
diff --git a/servers/audio/audio_driver_dummy.cpp b/servers/audio/audio_driver_dummy.cpp
index 3aaf73df03..e20990cdce 100644
--- a/servers/audio/audio_driver_dummy.cpp
+++ b/servers/audio/audio_driver_dummy.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "audio_driver_dummy.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "os/os.h"
Error AudioDriverDummy::init() {
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index 43f1175c79..253bf6e2ee 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "audio_server.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "io/resource_loader.h"
#include "os/file_access.h"
#include "os/os.h"
@@ -984,10 +984,10 @@ void AudioServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_bus_bypass_effects", "bus_idx", "enable"), &AudioServer::set_bus_bypass_effects);
ClassDB::bind_method(D_METHOD("is_bus_bypassing_effects", "bus_idx"), &AudioServer::is_bus_bypassing_effects);
- ClassDB::bind_method(D_METHOD("add_bus_effect", "bus_idx", "effect:AudioEffect"), &AudioServer::add_bus_effect, DEFVAL(-1));
+ ClassDB::bind_method(D_METHOD("add_bus_effect", "bus_idx", "effect:AudioEffect", "at_pos"), &AudioServer::add_bus_effect, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("remove_bus_effect", "bus_idx", "effect_idx"), &AudioServer::remove_bus_effect);
- ClassDB::bind_method(D_METHOD("get_bus_effect_count", "bus_idx"), &AudioServer::add_bus_effect);
+ ClassDB::bind_method(D_METHOD("get_bus_effect_count", "bus_idx"), &AudioServer::get_bus_effect_count);
ClassDB::bind_method(D_METHOD("get_bus_effect:AudioEffect", "bus_idx", "effect_idx"), &AudioServer::get_bus_effect);
ClassDB::bind_method(D_METHOD("swap_bus_effects", "bus_idx", "effect_idx", "by_effect_idx"), &AudioServer::swap_bus_effects);
diff --git a/servers/physics/space_sw.cpp b/servers/physics/space_sw.cpp
index 2d71fd6061..9e84fce000 100644
--- a/servers/physics/space_sw.cpp
+++ b/servers/physics/space_sw.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "space_sw.h"
#include "collision_solver_sw.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "physics_server_sw.h"
_FORCE_INLINE_ static bool _match_object_type_query(CollisionObjectSW *p_object, uint32_t p_collision_layer, uint32_t p_type_mask) {
diff --git a/servers/physics/space_sw.h b/servers/physics/space_sw.h
index 6ef12dbeae..6c6c433230 100644
--- a/servers/physics/space_sw.h
+++ b/servers/physics/space_sw.h
@@ -36,7 +36,7 @@
#include "body_sw.h"
#include "broad_phase_sw.h"
#include "collision_object_sw.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "hash_map.h"
#include "typedefs.h"
diff --git a/servers/physics_2d/broad_phase_2d_hash_grid.cpp b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
index 29f3396a1d..5b6c7e2f38 100644
--- a/servers/physics_2d/broad_phase_2d_hash_grid.cpp
+++ b/servers/physics_2d/broad_phase_2d_hash_grid.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "broad_phase_2d_hash_grid.h"
-#include "global_config.h"
+#include "project_settings.h"
#define LARGE_ELEMENT_FI 1.01239812
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp
index fe016d4d0c..6eb1106de8 100644
--- a/servers/physics_2d/physics_2d_server_sw.cpp
+++ b/servers/physics_2d/physics_2d_server_sw.cpp
@@ -31,7 +31,7 @@
#include "broad_phase_2d_basic.h"
#include "broad_phase_2d_hash_grid.h"
#include "collision_solver_2d_sw.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "os/os.h"
#include "script_language.h"
@@ -1264,7 +1264,7 @@ Physics2DServerSW::Physics2DServerSW() {
island_count = 0;
active_objects = 0;
collision_pairs = 0;
- using_threads = int(GlobalConfig::get_singleton()->get("physics/2d/thread_model")) == 2;
+ using_threads = int(ProjectSettings::get_singleton()->get("physics/2d/thread_model")) == 2;
};
Physics2DServerSW::~Physics2DServerSW(){
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
index d92c033e35..d39231b161 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp
@@ -161,12 +161,12 @@ Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool
step_thread_up = false;
alloc_mutex = Mutex::create();
- shape_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
- area_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
- body_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
- pin_joint_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
- groove_joint_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
- damped_spring_joint_pool_max_size = GLOBAL_GET("memory/multithread/thread_rid_pool_prealloc");
+ shape_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+ area_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+ body_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+ pin_joint_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+ groove_joint_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
+ damped_spring_joint_pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
if (!p_create_thread) {
server_thread = Thread::get_caller_ID();
diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.h b/servers/physics_2d/physics_2d_server_wrap_mt.h
index ac9066582e..5b00416b61 100644
--- a/servers/physics_2d/physics_2d_server_wrap_mt.h
+++ b/servers/physics_2d/physics_2d_server_wrap_mt.h
@@ -31,7 +31,7 @@
#define PHYSICS2DSERVERWRAPMT_H
#include "command_queue_mt.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "os/thread.h"
#include "servers/physics_2d_server.h"
diff --git a/servers/physics_2d/space_2d_sw.h b/servers/physics_2d/space_2d_sw.h
index a28233a4a6..c5bdfa3323 100644
--- a/servers/physics_2d/space_2d_sw.h
+++ b/servers/physics_2d/space_2d_sw.h
@@ -36,7 +36,7 @@
#include "body_pair_2d_sw.h"
#include "broad_phase_2d_sw.h"
#include "collision_object_2d_sw.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "hash_map.h"
#include "typedefs.h"
diff --git a/servers/register_server_types.cpp b/servers/register_server_types.cpp
index e97a6baeba..c5029d1e13 100644
--- a/servers/register_server_types.cpp
+++ b/servers/register_server_types.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "register_server_types.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "audio/audio_effect.h"
#include "audio/audio_stream.h"
@@ -73,12 +73,10 @@ ShaderTypes *shader_types = NULL;
void register_server_types() {
- GLOBAL_DEF("memory/multithread/thread_rid_pool_prealloc", 20);
-
- GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("VisualServer", VisualServer::get_singleton()));
- GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("AudioServer", AudioServer::get_singleton()));
- GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("PhysicsServer", PhysicsServer::get_singleton()));
- GlobalConfig::get_singleton()->add_singleton(GlobalConfig::Singleton("Physics2DServer", Physics2DServer::get_singleton()));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("VisualServer", VisualServer::get_singleton()));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("AudioServer", AudioServer::get_singleton()));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("PhysicsServer", PhysicsServer::get_singleton()));
+ ProjectSettings::get_singleton()->add_singleton(ProjectSettings::Singleton("Physics2DServer", Physics2DServer::get_singleton()));
shader_types = memnew(ShaderTypes);
diff --git a/servers/visual/shader_types.cpp b/servers/visual/shader_types.cpp
index 599a6419a7..3de0841f2a 100644
--- a/servers/visual/shader_types.cpp
+++ b/servers/visual/shader_types.cpp
@@ -66,6 +66,7 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["POINT_SIZE"] = ShaderLanguage::TYPE_FLOAT;
shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_ID"] = ShaderLanguage::TYPE_INT;
shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["INSTANCE_CUSTOM"] = ShaderLanguage::TYPE_VEC4;
+ shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["ROUGHNESS"] = ShaderLanguage::TYPE_FLOAT;
//builtins
shader_modes[VS::SHADER_SPATIAL].functions["vertex"]["WORLD_MATRIX"] = ShaderLanguage::TYPE_MAT4;
@@ -147,6 +148,8 @@ ShaderTypes::ShaderTypes() {
shader_modes[VS::SHADER_SPATIAL].modes.insert("skip_vertex_transform");
shader_modes[VS::SHADER_SPATIAL].modes.insert("world_vertex_coords");
+ shader_modes[VS::SHADER_SPATIAL].modes.insert("vertex_lighting");
+
/************ CANVAS ITEM **************************/
shader_modes[VS::SHADER_CANVAS_ITEM].functions["vertex"]["SRC_VERTEX"] = ShaderLanguage::TYPE_VEC2;
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 8d332b3e6c..da6174cd5c 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "visual_server_raster.h"
#include "default_mouse_cursor.xpm"
-#include "global_config.h"
+#include "project_settings.h"
#include "io/marshalls.h"
#include "os/os.h"
#include "sort.h"
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 433b6e945e..2a37b64759 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server_viewport.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "visual_server_canvas.h"
#include "visual_server_global.h"
#include "visual_server_scene.h"
@@ -265,7 +265,7 @@ void VisualServerViewport::draw_viewports() {
//draw viewports
- clear_color = GLOBAL_GET("rendering/viewport/default_clear_color");
+ clear_color = GLOBAL_GET("rendering/environment/default_clear_color");
active_viewports.sort_custom<ViewportSort>();
diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp
index fd15633244..bdd41b0a57 100644
--- a/servers/visual/visual_server_wrap_mt.cpp
+++ b/servers/visual/visual_server_wrap_mt.cpp
@@ -27,7 +27,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server_wrap_mt.h"
-#include "global_config.h"
+#include "project_settings.h"
#include "os/os.h"
void VisualServerWrapMT::thread_exit() {
@@ -176,7 +176,7 @@ VisualServerWrapMT::VisualServerWrapMT(VisualServer *p_contained, bool p_create_
draw_pending = 0;
draw_thread_up = false;
alloc_mutex = Mutex::create();
- pool_max_size = GLOBAL_DEF("memory/servers/thread_rid_prealloc_amount", 20);
+ pool_max_size = GLOBAL_GET("memory/limits/multithreaded_server/rid_pool_prealloc");
if (!p_create_thread) {
server_thread = Thread::get_caller_ID();
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index c833f4eabd..277b401d49 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "visual_server.h"
-#include "global_config.h"
#include "method_bind_ext.gen.inc"
+#include "project_settings.h"
VisualServer *VisualServer::singleton = NULL;
VisualServer *(*VisualServer::create_func)() = NULL;
@@ -1567,10 +1567,39 @@ VisualServer::VisualServer() {
//ERR_FAIL_COND(singleton);
singleton = this;
- GLOBAL_DEF("rendering/vram_formats/use_s3tc", true);
- GLOBAL_DEF("rendering/vram_formats/use_etc", false);
- GLOBAL_DEF("rendering/vram_formats/use_etc2", true);
- GLOBAL_DEF("rendering/vram_formats/use_pvrtc", false);
+ GLOBAL_DEF("rendering/vram_compression/import_s3tc", true);
+ GLOBAL_DEF("rendering/vram_compression/import_etc", false);
+ GLOBAL_DEF("rendering/vram_compression/import_etc2", true);
+ GLOBAL_DEF("rendering/vram_compression/import_pvrtc", false);
+
+ GLOBAL_DEF("rendering/quality/directional_shadow/size", 4096);
+ GLOBAL_DEF("rendering/quality/directional_shadow/size.mobile", 2048);
+ GLOBAL_DEF("rendering/quality/shadow_atlas/size", 4096);
+ GLOBAL_DEF("rendering/quality/shadow_atlas/size.mobile", 2048);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/shadow_atlas/size", PropertyInfo(Variant::INT, "rendering/shadow_atlas/size", PROPERTY_HINT_RANGE, "256,16384"));
+ GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_0_subdiv", 1);
+ GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_1_subdiv", 2);
+ GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_2_subdiv", 3);
+ GLOBAL_DEF("rendering/quality/shadow_atlas/quadrant_3_subdiv", 4);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_0_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_0_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_1_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_1_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_2_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_2_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadow_atlas/quadrant_3_subdiv", PropertyInfo(Variant::INT, "rendering/quality/shadow_atlas/quadrant_3_subdiv", PROPERTY_HINT_ENUM, "Disabled,1 Shadow,4 Shadows,16 Shadows,64 Shadows,256 Shadows,1024 Shadows"));
+
+ GLOBAL_DEF("rendering/quality/shadows/filter_mode", 1);
+ GLOBAL_DEF("rendering/quality/shadows/filter_mode.mobile", 0);
+ ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/shadows/filter_mode", PropertyInfo(Variant::INT, "rendering/quality/shadows/filter_mode", PROPERTY_HINT_ENUM, "Disabled,PCF5,PCF13"));
+
+ GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections", true);
+ GLOBAL_DEF("rendering/quality/reflections/texture_array_reflections.mobile", false);
+ GLOBAL_DEF("rendering/quality/reflections/high_quality_ggx", true);
+ GLOBAL_DEF("rendering/quality/reflections/high_quality_ggx.mobile", false);
+
+ GLOBAL_DEF("rendering/quality/shading/force_vertex_shading", false);
+ GLOBAL_DEF("rendering/quality/shading/force_vertex_shading.mobile", true);
+
+ GLOBAL_DEF("rendering/quality/depth_prepass/enable", true);
+ GLOBAL_DEF("rendering/quality/depth_prepass/disable_for_vendors", "PowerVR,Mali,Adreno");
}
VisualServer::~VisualServer() {