-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add support for editing Godot shaders in an external editor #1466
Comments
Shaders are often embedded in scenes/resources, so there would have to be a way to communicate the saved file back to the Godot editor (perhaps by saving to a temporary location). |
I think a necessary first step would be for 3rd party text editors to support Godot syntax. It goes without saying, but we don't control the tooling for 3rd party projects. For example, a Godot shader typically has two "processor functions" I guess it is a chicken and egg problem. Why would anyone support our syntax when it is so hard to open Godot shaders in external editors, but then again, why would we add support for external editors if no one supports our syntax? |
Maybe you're thinking about support Godot language in shader editors like shadertoy. But that's not what I'm proposing. This proposal is about add Godot shader language to text editors like VSCode the same way it already have support to GDScript language. |
I understand! As I said above, it would be great if someone added support for Godot syntax to 3rd party text editors. |
I feel like there are multiple feature requests intertwined together here. One is about allowing Godot to use an external shader editor:
One is about developing extensions:
We do have an officially-maintained VS Code extension to which we can add Godot shader language support, but other editors should be left to the community. PS: MSVC is a compiler, the IDE is called Visual Studio 🙂 |
My proposal was only about support external text editors like VSCode. Use external shader editors like shadertoy to godot shaders is quite useless. Edited the proposal to make it more specific. |
@vitorbalbio By "external shader editor", I mean opening an external text editor of any kind when choosing a shader in the Godot editor. |
Maybe we can make shaders as script files and we link to the shader file path in the scenes/resources, or we allow the use of GLSL and it will be supported in many IDEs. This will require so much work to be done yes but there are some hacks for it.
|
Using GLSL directly is already supported in Godot 4.0, but it's intended for advanced users only and will remain so. The Godot shader has a lot of usability niceties for a reason 🙂 |
Will it be back-ported to 3.x ? |
No, as it relies on compatibility-breaking changes.
I would suggest forking an existing GLSL grammar file for your editor/IDE and modifying it to support the Godot shader language's built-in functions and variables. |
I think the first step is to simply allow Godot shaders to be opened in and external code editor. When setting up an external editor I was confused as to why the shaders were still opening with Godot and thought maybe it was a bug. I understand the concern with auto completion but tbh the autocompletion feature in Godot's own shader editor is already rather limited so I feel that this isn't a major loss over the benefits an external editor can provide (not to mention that VSCode already has several GLSL extensions with syntax highlighting and some basic snippets). If I chose to use an external editor it's mainly because I can customise the experience to my liking with shortcuts, snippets etc. and to keep the coding side separate for the game editor. Currently having to juggle between 2 editors and remembering two sets of shortcuts and behaviours is a pain. Could we get at least get a "use external editor for shaders" checkbox so that those you want to use an external editor can do so ? |
Only making it open in an external editor would already be awesome. The community can improve it over time with external plugins for each IDE |
Any updates on this? Would love to see this implemented (I am addicted to my vim binds). Any thoughts on how this could be implemented? What are the current setbacks/issues? |
Describe the project you are working on:
Space Tactical RPG https://twitter.com/ZeroPointGame
Describe the problem or limitation you are having in your project:
You can't nicely edit Godot Shaders in external text editors like VSCode.
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Described above.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
Will be used all the time for everyone that use external editors.
Is there a reason why this should be core and not an add-on in the asset library?:
It's a core feature for the ecosystem not to Godot editor only itself.
The text was updated successfully, but these errors were encountered: