summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index c5d61469dd..462ecff93e 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -86,6 +86,18 @@ public:
UPDATE_ALWAYS
};
+ enum ShadowAtlasQuadrantSubdiv {
+ SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_1,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_4,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_16,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_64,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_256,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_1024,
+ SHADOW_ATLAS_QUADRANT_SUBDIV_MAX,
+
+ };
+
private:
friend class ViewportTexture;
@@ -120,8 +132,6 @@ friend class ViewportTexture;
RID contact_3d_debug_multimesh;
RID contact_3d_debug_instance;
-
-
bool size_override;
bool size_override_stretch;
Size2 size_override_size;
@@ -175,6 +185,9 @@ friend class ViewportTexture;
RID texture_rid;
Ref<ViewportTexture> texture;
+ int shadow_atlas_size;
+ ShadowAtlasQuadrantSubdiv shadow_atlas_quadrant_subdiv[4];
+
struct GUI {
// info used when this is a window
@@ -347,6 +360,11 @@ public:
UpdateMode get_update_mode() const;
Ref<ViewportTexture> get_texture() const;
+ void set_shadow_atlas_size(int p_size);
+ int get_shadow_atlas_size() const;
+
+ void set_shadow_atlas_quadrant_subdiv(int p_quadrant,ShadowAtlasQuadrantSubdiv p_subdiv);
+ ShadowAtlasQuadrantSubdiv get_shadow_atlas_quadrant_subdiv(int p_quadrant) const;
Vector2 get_camera_coords(const Vector2& p_viewport_coords) const;
Vector2 get_camera_rect_size() const;
@@ -393,4 +411,6 @@ public:
};
VARIANT_ENUM_CAST(Viewport::UpdateMode);
+VARIANT_ENUM_CAST(Viewport::ShadowAtlasQuadrantSubdiv);
+
#endif