summaryrefslogtreecommitdiffstats
path: root/servers/rendering_server.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-29 14:44:09 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-10-08 18:22:10 +0200
commit73c6e19acc69b7367c4fa67cd4377e2207faf898 (patch)
tree35720ecbf3c231606efecb3c01fc603fb3a193a0 /servers/rendering_server.cpp
parenta5a52233bc1327d8943c0a2a3866aa314371edec (diff)
downloadredot-engine-73c6e19acc69b7367c4fa67cd4377e2207faf898.tar.gz
Allow any floating-point value as a 3D rendering scale option
This allows for finer control over 3D rendering resolution. Supersampling can also be performed by setting a 3D rendering resolution above 1.0, which is useful for offline rendering or for very high-end GPUs.
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r--servers/rendering_server.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index 93919a5ec6..7e66ddbb0f 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -2269,12 +2269,6 @@ void RenderingServer::_bind_methods() {
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES);
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_OCCLUDERS);
- BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_DISABLED);
- BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_75_PERCENT);
- BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_50_PERCENT);
- BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_33_PERCENT);
- BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_25_PERCENT);
-
/* SKY API */
ClassDB::bind_method(D_METHOD("sky_create"), &RenderingServer::sky_create);
@@ -2817,11 +2811,11 @@ RenderingServer::RenderingServer() {
"rendering/vulkan/rendering/back_end",
PROPERTY_HINT_ENUM, "Forward Clustered (Supports Desktop Only),Forward Mobile (Supports Desktop and Mobile)"));
- GLOBAL_DEF("rendering/3d/viewport/scale", 0);
+ GLOBAL_DEF("rendering/3d/viewport/scale", 1.0);
ProjectSettings::get_singleton()->set_custom_property_info("rendering/3d/viewport/scale",
- PropertyInfo(Variant::INT,
+ PropertyInfo(Variant::FLOAT,
"rendering/3d/viewport/scale",
- PROPERTY_HINT_ENUM, "Disabled,75%,50%,33%,25%"));
+ PROPERTY_HINT_RANGE, "0.25,2.0,0.01"));
GLOBAL_DEF("rendering/shader_compiler/shader_cache/enabled", true);
GLOBAL_DEF("rendering/shader_compiler/shader_cache/compress", true);