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.
This commit is contained in:
@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user