summaryrefslogtreecommitdiffstats
path: root/servers/visual_server.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-08-26 17:43:58 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 12:01:05 +0100
commit2d6a916835bd851b2ea03a2e887ba83f0065dae4 (patch)
tree25542172b4275da52396b40033d8e77f7e2ce64c /servers/visual_server.cpp
parentf7aa7927e7268f7b9f99eed18e13dd04e25be8b2 (diff)
downloadredot-engine-2d6a916835bd851b2ea03a2e887ba83f0065dae4.tar.gz
Environment sky more or less working.
Diffstat (limited to 'servers/visual_server.cpp')
-rw-r--r--servers/visual_server.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp
index 7aa2160545..e83498389e 100644
--- a/servers/visual_server.cpp
+++ b/servers/visual_server.cpp
@@ -1602,7 +1602,7 @@ void VisualServer::_bind_methods() {
#ifndef _3D_DISABLED
ClassDB::bind_method(D_METHOD("sky_create"), &VisualServer::sky_create);
- ClassDB::bind_method(D_METHOD("sky_set_texture", "sky", "cube_map", "radiance_size"), &VisualServer::sky_set_texture);
+ ClassDB::bind_method(D_METHOD("sky_set_texture", "sky", "panorama"), &VisualServer::sky_set_texture);
#endif
ClassDB::bind_method(D_METHOD("shader_create"), &VisualServer::shader_create);
ClassDB::bind_method(D_METHOD("shader_set_code", "shader", "code"), &VisualServer::shader_set_code);
@@ -2171,11 +2171,19 @@ void VisualServer::_bind_methods() {
BIND_ENUM_CONSTANT(ENV_BG_CLEAR_COLOR);
BIND_ENUM_CONSTANT(ENV_BG_COLOR);
BIND_ENUM_CONSTANT(ENV_BG_SKY);
- BIND_ENUM_CONSTANT(ENV_BG_COLOR_SKY);
BIND_ENUM_CONSTANT(ENV_BG_CANVAS);
BIND_ENUM_CONSTANT(ENV_BG_KEEP);
BIND_ENUM_CONSTANT(ENV_BG_MAX);
+ BIND_ENUM_CONSTANT(ENV_AMBIENT_SOURCE_BG);
+ BIND_ENUM_CONSTANT(ENV_AMBIENT_SOURCE_DISABLED);
+ BIND_ENUM_CONSTANT(ENV_AMBIENT_SOURCE_COLOR);
+ BIND_ENUM_CONSTANT(ENV_AMBIENT_SOURCE_SKY);
+
+ BIND_ENUM_CONSTANT(ENV_REFLECTION_SOURCE_BG);
+ BIND_ENUM_CONSTANT(ENV_REFLECTION_SOURCE_DISABLED);
+ BIND_ENUM_CONSTANT(ENV_REFLECTION_SOURCE_SKY);
+
BIND_ENUM_CONSTANT(ENV_DOF_BLUR_QUALITY_LOW);
BIND_ENUM_CONSTANT(ENV_DOF_BLUR_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(ENV_DOF_BLUR_QUALITY_HIGH);
@@ -2290,12 +2298,13 @@ VisualServer::VisualServer() {
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/roughness_layers", 6);
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/reflections/irradiance_max_size", 128);
- ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/reflections/irradiance_max_size", PropertyInfo(Variant::INT, "rendering/quality/reflections/irradiance_max_size", PROPERTY_HINT_RANGE, "32,2048"));
+ GLOBAL_DEF("rendering/quality/reflections/ggx_samples", 1024);
+ GLOBAL_DEF("rendering/quality/reflections/ggx_samples.mobile", 128);
+ GLOBAL_DEF("rendering/quality/reflections/ggx_samples_realtime", 64);
+ GLOBAL_DEF("rendering/quality/reflections/ggx_samples_realtime.mobile", 16);
GLOBAL_DEF("rendering/quality/shading/force_vertex_shading", false);
GLOBAL_DEF("rendering/quality/shading/force_vertex_shading.mobile", true);