-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Support CUSTOM shader attributes in 2D #76276
Support CUSTOM shader attributes in 2D #76276
Conversation
933c8f2
to
5b41902
Compare
I haven't been able to take a deep look, but I was reminded of this while looking through the spec for something else. The spec guarantees that at least 16 vertex attribute slots will be available. You seem to have mixed up vertex attributes and varyings (vertex output to the fragment shader). This means you have one more slot to play with than before! |
86bb736
to
9ebde53
Compare
Updated to move the gles3 attributes down 1 more slot, so CUSTOM0 and CUSTOM1 works in compatibility. |
@clayjohn @akien-mga |
This looks good to me on principle, but I'd like to have a testing project to make sure this works as expected. Also, this PR needs to be rebased. |
Is there anything I can do to help this move forward? I need this for a couple of plugins I'm writing for advanced 2D features. |
Yes #76276 (comment) |
9ebde53
to
d8fb632
Compare
You squashed in a way that took the wrong commit message, and changed the author, because you used merging instead of rebasing, please fix your commit message |
I added a sample project in the description, what specifically are you looking for in a testing project? |
🙏 forgive me, have not worked in Godot world for a long time. I did use pull --rebase to update, though. |
See the PR workflow documentation 🙂 |
3f03043
to
507e2b0
Compare
Please rebase onto master, your history is garbled 🙂, you include a merge commit indirectly |
507e2b0
to
13a0d6e
Compare
Yeah, the rebase just made it equal to master. I'm just going to manually fix this. |
Github doesn't recognize that this PR can be reopened due to branch changes. Continued here: https://github.com/godotengine/godot/pull/86564/files |
Closes: godotengine/godot-proposals#6703
A general summary of changes:
The reason only CUSTOM0, CUSTOM1 is supported for OpenGL ES 3, is I don't perceive the complexity behind reorganizing these attributes in the code as worth the maintenance it would require for the change. The assumption here is the attribute layout slots 14, 15 should exist under the minimum GL specification, so all of the slots are shifted down to make use of that. You can read more about this in the proposal linked above.
Sample project:
CanvasShaderTest.zip