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

GraphEdit: Make connection shaders customizable #11384

Closed
MilheiroSantos opened this issue Dec 19, 2024 · 2 comments
Closed

GraphEdit: Make connection shaders customizable #11384

MilheiroSantos opened this issue Dec 19, 2024 · 2 comments

Comments

@MilheiroSantos
Copy link

Describe the project you are working on

I'm developing a game featuring an electronics circuit builder, and I've been prototyping whether I could use the GraphEdit Node to create the circuit part. I'd assume other projects may also need such a feature. For example, it would be nice to override the shaders to create animations. I'm okay with implementing the feature if it gets the go-ahead.

Describe the problem or limitation you are having in your project

In version 4.3, I'm able to override the line drawing algorithm by using the _get_connection_line function. I'm missing a similar functionality in GDscript to override the line shader.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Creating a way to override the shader will allow me to create a custom pixelated theme to my game.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

The most straightforward way to enable this feature would be export the override_connections_shader function. Though I suspect there are good reasons why the function was not exported, as it relies on working well with the default line material.
We could also spend some time creating a new GraphConnection node and allow the material to be overridden there.

If this enhancement will not be used often, can it be worked around with a few lines of script?

I couldn't find a quick workaround.

Is there a reason why this should be core and not an add-on in the asset library?

Honestly, I'm not sure. I'll need to develop this functionality for my game. I believe in Open Source and the power of sharing. If you think the enhancements needed for my specific use-case benefit the community, I'm happy to contribute my time.

@sockeye-d
Copy link

I don't think the node graph system built into Godot is a good fit for your problem, you might consider making your own solution

@MilheiroSantos
Copy link
Author

Thank you for your feedback and time. I'll then build my own solution.

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

No branches or pull requests

4 participants