summaryrefslogtreecommitdiff
path: root/scene/resources/texture.h
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-05-02 03:53:10 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-08-13 23:16:24 +0200
commit1d257d02db5946a5a3c38f48e93176a8a86b20ec (patch)
tree2d10bb10673d12528f6dc3e0fbf6ede87bef77b5 /scene/resources/texture.h
parent761eb7e06a25f61037ebbb62e57058c5ec2866a2 (diff)
Add an `use_hdr` property to GradientTexture to allow storing HDR colors
This is disabled by default to save some memory and preserve the existing behavior of clamping colors.
Diffstat (limited to 'scene/resources/texture.h')
-rw-r--r--scene/resources/texture.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 2e97c2deb1..f6b991c335 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -686,6 +686,7 @@ private:
bool update_pending = false;
RID texture;
int width = 2048;
+ bool use_hdr = false;
void _queue_update();
void _update();
@@ -700,6 +701,9 @@ public:
void set_width(int p_width);
int get_width() const override;
+ void set_use_hdr(bool p_enabled);
+ bool is_using_hdr() const;
+
virtual RID get_rid() const override { return texture; }
virtual int get_height() const override { return 1; }
virtual bool has_alpha() const override { return true; }