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 gradients #18387

Closed
Fatesight opened this issue Apr 23, 2018 · 4 comments
Closed

Radial gradients #18387

Fatesight opened this issue Apr 23, 2018 · 4 comments

Comments

@Fatesight
Copy link

Godot version:
3.0.2

OS/device including version:
Irrelevant.

Issue description:
Currently there seems to be no way to programmatically create radial gradients. Having to create them in an external tool and import them as textures is not only inconvenient, but also makes it impossible to effectively manipulate them at runtime.

@Zylann
Copy link
Contributor

Zylann commented Apr 23, 2018

With a bit of work, it's possible to make them programmatically by generating a triangle strip polygon with appropriate vertex colors. Or easier, a shader with a GradientTexture as parameter (or a few colors) and a bit of UV math magic:

image

RadialGradient.zip

@ghost ghost added the feature proposal label Apr 26, 2018
@regakakobigman
Copy link

This would still be really useful. Radial gradients would be perfect for 2D lights.

It is not very convenient to open up an image editor just to edit a gradient. Every image editor handles them differently, too. It would be easier if these could be edited in the editor

@groud groud changed the title [Feature suggestion] Radial gradients Radial gradients Jul 26, 2019
@Maujoe
Copy link

Maujoe commented Aug 26, 2019

For all those looking for a temporary solution:

https://github.com/Maujoe/godot-custom-gradient-texture
I have created a custom resource script as temporary workaround to create different gradient types it's also in the asset library so you can access it inside godot.

@Calinou
Copy link
Member

Calinou commented May 26, 2020

Superseded by godotengine/godot-proposals#1677.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants