summaryrefslogtreecommitdiff
path: root/modules/opensimplex/noise_texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/opensimplex/noise_texture.h')
-rw-r--r--modules/opensimplex/noise_texture.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index e89479d962..6237b6460d 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -34,7 +34,7 @@
#include "open_simplex_noise.h"
#include "core/io/image.h"
-#include "core/object/reference.h"
+#include "core/object/ref_counted.h"
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
#include "editor/property_editor.h"
@@ -43,7 +43,7 @@ class NoiseTexture : public Texture2D {
GDCLASS(NoiseTexture, Texture2D);
private:
- Ref<Image> data;
+ Ref<Image> image;
Thread noise_thread;
@@ -56,6 +56,7 @@ private:
Ref<OpenSimplexNoise> noise;
Vector2i size = Vector2i(512, 512);
+ Vector2 noise_offset;
bool seamless = false;
bool as_normal_map = false;
float bump_strength = 8.0;
@@ -66,7 +67,7 @@ private:
void _queue_update();
Ref<Image> _generate_texture();
void _update_texture();
- void _set_texture_data(const Ref<Image> &p_image);
+ void _set_texture_image(const Ref<Image> &p_image);
protected:
static void _bind_methods();
@@ -79,6 +80,9 @@ public:
void set_width(int p_width);
void set_height(int p_height);
+ void set_noise_offset(Vector2 p_noise_offset);
+ Vector2 get_noise_offset() const;
+
void set_seamless(bool p_seamless);
bool get_seamless();
@@ -94,7 +98,7 @@ public:
virtual RID get_rid() const override;
virtual bool has_alpha() const override { return false; }
- virtual Ref<Image> get_data() const override;
+ virtual Ref<Image> get_image() const override;
NoiseTexture();
virtual ~NoiseTexture();