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

[3.x] Allow reading shaders from .gdshader files #49983

Merged
merged 1 commit into from
Jul 20, 2021

Conversation

aaronfranke
Copy link
Member

This PR adds support for reading .gdshader files, which adds forwards compatibility with #47336.

Shaders seem to be the same between 3.x and the current master (at least the code for simple ones hasn't changed), it's only the file extension that changed. Since only .gdshader can be read in 4.0, once that comes out, shader authors will likely use .gdshader. If we allow 3.x to read these files, then these shaders can be easily used in 3.x without renaming the files. This will also make it easier for people to future-proof their projects for eventual conversion to Godot 4.0 (at the cost of the shaders not being able to be read in Godot 3.3.2 or lower). But for now I would still recommend users use .shader (or .tres).

When saving, the default file extension is .tres (same as the current 3.x), and both .shader and .gdshader are options.

@akien-mga akien-mga merged commit 89097fa into godotengine:3.x Jul 20, 2021
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the 3.x-gdshader branch July 20, 2021 06:09
@akien-mga
Copy link
Member

Cherry-picked for 3.3.3.

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

Successfully merging this pull request may close these issues.

2 participants