summaryrefslogtreecommitdiff
path: root/scene/3d/visual_instance_3d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/visual_instance_3d.h')
-rw-r--r--scene/3d/visual_instance_3d.h36
1 files changed, 24 insertions, 12 deletions
diff --git a/scene/3d/visual_instance_3d.h b/scene/3d/visual_instance_3d.h
index cc5f92066f..a871c65b6a 100644
--- a/scene/3d/visual_instance_3d.h
+++ b/scene/3d/visual_instance_3d.h
@@ -85,13 +85,6 @@ class GeometryInstance3D : public VisualInstance3D {
GDCLASS(GeometryInstance3D, VisualInstance3D);
public:
- enum Flags {
- FLAG_USE_BAKED_LIGHT = RS::INSTANCE_FLAG_USE_BAKED_LIGHT,
- FLAG_USE_DYNAMIC_GI = RS::INSTANCE_FLAG_USE_DYNAMIC_GI,
- FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = RS::INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE,
- FLAG_MAX = RS::INSTANCE_FLAG_MAX,
- };
-
enum ShadowCastingSetting {
SHADOW_CASTING_SETTING_OFF = RS::SHADOW_CASTING_SETTING_OFF,
SHADOW_CASTING_SETTING_ON = RS::SHADOW_CASTING_SETTING_ON,
@@ -99,8 +92,21 @@ public:
SHADOW_CASTING_SETTING_SHADOWS_ONLY = RS::SHADOW_CASTING_SETTING_SHADOWS_ONLY
};
+ enum GIMode {
+ GI_MODE_DISABLED,
+ GI_MODE_BAKED,
+ GI_MODE_DYNAMIC
+ };
+
+ enum LightmapScale {
+ LIGHTMAP_SCALE_1X,
+ LIGHTMAP_SCALE_2X,
+ LIGHTMAP_SCALE_4X,
+ LIGHTMAP_SCALE_8X,
+ LIGHTMAP_SCALE_MAX,
+ };
+
private:
- bool flags[FLAG_MAX];
ShadowCastingSetting shadow_casting_setting;
Ref<Material> material_override;
float lod_min_distance;
@@ -112,6 +118,8 @@ private:
mutable HashMap<StringName, StringName> instance_uniform_property_remap;
float extra_cull_margin;
+ LightmapScale lightmap_scale;
+ GIMode gi_mode;
const StringName *_instance_uniform_get_remap(const StringName p_name) const;
@@ -124,9 +132,6 @@ protected:
static void _bind_methods();
public:
- void set_flag(Flags p_flag, bool p_value);
- bool get_flag(Flags p_flag) const;
-
void set_cast_shadows_setting(ShadowCastingSetting p_shadow_casting_setting);
ShadowCastingSetting get_cast_shadows_setting() const;
@@ -148,6 +153,12 @@ public:
void set_extra_cull_margin(float p_margin);
float get_extra_cull_margin() const;
+ void set_gi_mode(GIMode p_mode);
+ GIMode get_gi_mode() const;
+
+ void set_lightmap_scale(LightmapScale p_scale);
+ LightmapScale get_lightmap_scale() const;
+
void set_shader_instance_uniform(const StringName &p_uniform, const Variant &p_value);
Variant get_shader_instance_uniform(const StringName &p_uniform) const;
@@ -156,7 +167,8 @@ public:
GeometryInstance3D();
};
-VARIANT_ENUM_CAST(GeometryInstance3D::Flags);
VARIANT_ENUM_CAST(GeometryInstance3D::ShadowCastingSetting);
+VARIANT_ENUM_CAST(GeometryInstance3D::LightmapScale);
+VARIANT_ENUM_CAST(GeometryInstance3D::GIMode);
#endif