Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radial gradient converted to linear gradient when using get_image() #80837

Closed
01271 opened this issue Aug 21, 2023 · 2 comments
Closed

Radial gradient converted to linear gradient when using get_image() #80837

01271 opened this issue Aug 21, 2023 · 2 comments
Labels

Comments

@01271
Copy link

01271 commented Aug 21, 2023

Godot version

4.1.1

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3168) - AMD Ryzen 7 7800X3D 8-Core Processor (16 Threads)

Issue description

Using get_image on a radial GradientTexture2D returns a linear gradient instead of a radial gradient.
image
This image illustrates the same gradient in two places. The one on the left has been converted using get_image() and the one on the right uses the same texture but has not been converted.

Steps to reproduce

Create 2d radial gradient, turn into image texture, draw image texture.

Minimal reproduction project

GradientDemo.zip

@01271
Copy link
Author

01271 commented Aug 21, 2023

This issue is present on all 3 renderers. Forward, mobile, compatibility.

@kleonc
Copy link
Member

kleonc commented Aug 21, 2023

Duplicate of #66627 (when get_image is called GradientTexture2D has not yet generated/updated its texture as it is deferred).

A workaround is to call get_image also in a deferred manner (e.g. after awaiting SceneTree.process_frame signal).

@kleonc kleonc closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants