summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
authorClay John <claynjohn@gmail.com>2021-10-08 10:28:02 -0700
committerGitHub <noreply@github.com>2021-10-08 10:28:02 -0700
commit58aa020a19162becc9a00fed8a240eb12b0ab964 (patch)
tree35720ecbf3c231606efecb3c01fc603fb3a193a0 /scene/main/viewport.h
parenta5a52233bc1327d8943c0a2a3866aa314371edec (diff)
parent73c6e19acc69b7367c4fa67cd4377e2207faf898 (diff)
Merge pull request #52215 from Calinou/scale-3d-use-float-value
Allow any floating-point value as a 3D rendering scale option
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 3732f9cfd1..1f19ff04c9 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -89,14 +89,6 @@ class Viewport : public Node {
GDCLASS(Viewport, Node);
public:
- enum Scale3D {
- SCALE_3D_DISABLED,
- SCALE_3D_75_PERCENT,
- SCALE_3D_50_PERCENT,
- SCALE_3D_33_PERCENT,
- SCALE_3D_25_PERCENT
- };
-
enum ShadowAtlasQuadrantSubdiv {
SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED,
SHADOW_ATLAS_QUADRANT_SUBDIV_1,
@@ -592,7 +584,7 @@ public:
#ifndef _3D_DISABLED
bool use_xr = false;
- Scale3D scale_3d = SCALE_3D_DISABLED;
+ float scale_3d = 1.0;
friend class AudioListener3D;
AudioListener3D *audio_listener_3d = nullptr;
Set<AudioListener3D *> audio_listener_3d_set;
@@ -664,8 +656,8 @@ public:
void set_use_xr(bool p_use_xr);
bool is_using_xr();
- void set_scale_3d(const Scale3D p_scale_3d);
- Scale3D get_scale_3d() const;
+ void set_scale_3d(float p_scale_3d);
+ float get_scale_3d() const;
#endif // _3D_DISABLED
Viewport();
@@ -724,7 +716,6 @@ VARIANT_ENUM_CAST(SubViewport::UpdateMode);
VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
VARIANT_ENUM_CAST(Viewport::MSAA);
VARIANT_ENUM_CAST(Viewport::ScreenSpaceAA);
-VARIANT_ENUM_CAST(Viewport::Scale3D);
VARIANT_ENUM_CAST(Viewport::DebugDraw);
VARIANT_ENUM_CAST(Viewport::SDFScale);
VARIANT_ENUM_CAST(Viewport::SDFOversize);