summaryrefslogtreecommitdiff
path: root/scene/3d/reflection_probe.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/reflection_probe.h')
-rw-r--r--scene/3d/reflection_probe.h38
1 files changed, 24 insertions, 14 deletions
diff --git a/scene/3d/reflection_probe.h b/scene/3d/reflection_probe.h
index 28ca680e9f..56177d0f95 100644
--- a/scene/3d/reflection_probe.h
+++ b/scene/3d/reflection_probe.h
@@ -31,13 +31,13 @@
#ifndef REFLECTIONPROBE_H
#define REFLECTIONPROBE_H
-#include "scene/3d/visual_instance.h"
+#include "scene/3d/visual_instance_3d.h"
#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
-#include "servers/visual_server.h"
+#include "servers/rendering_server.h"
-class ReflectionProbe : public VisualInstance {
- GDCLASS(ReflectionProbe, VisualInstance);
+class ReflectionProbe : public VisualInstance3D {
+ GDCLASS(ReflectionProbe, VisualInstance3D);
public:
enum UpdateMode {
@@ -45,6 +45,12 @@ public:
UPDATE_ALWAYS,
};
+ enum AmbientMode {
+ AMBIENT_DISABLED,
+ AMBIENT_ENVIRONMENT,
+ AMBIENT_COLOR
+ };
+
private:
RID probe;
float intensity;
@@ -54,26 +60,29 @@ private:
bool box_projection;
bool enable_shadows;
bool interior;
- Color interior_ambient;
- float interior_ambient_energy;
- float interior_ambient_probe_contribution;
+ AmbientMode ambient_mode;
+ Color ambient_color;
+ float ambient_color_energy;
uint32_t cull_mask;
UpdateMode update_mode;
protected:
static void _bind_methods();
- void _validate_property(PropertyInfo &property) const;
+ void _validate_property(PropertyInfo &property) const override;
public:
void set_intensity(float p_intensity);
float get_intensity() const;
- void set_interior_ambient(Color p_ambient);
- Color get_interior_ambient() const;
+ void set_ambient_mode(AmbientMode p_mode);
+ AmbientMode get_ambient_mode() const;
+
+ void set_ambient_color(Color p_ambient);
+ Color get_ambient_color() const;
- void set_interior_ambient_energy(float p_energy);
- float get_interior_ambient_energy() const;
+ void set_ambient_color_energy(float p_energy);
+ float get_ambient_color_energy() const;
void set_interior_ambient_probe_contribution(float p_contribution);
float get_interior_ambient_probe_contribution() const;
@@ -102,13 +111,14 @@ public:
void set_update_mode(UpdateMode p_mode);
UpdateMode get_update_mode() const;
- virtual AABB get_aabb() const;
- virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const;
+ virtual AABB get_aabb() const override;
+ virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const override;
ReflectionProbe();
~ReflectionProbe();
};
+VARIANT_ENUM_CAST(ReflectionProbe::AmbientMode);
VARIANT_ENUM_CAST(ReflectionProbe::UpdateMode);
#endif // REFLECTIONPROBE_H