-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Implement 2D instance shader parameters #97058
Conversation
Parameter list doesn't work properly. It's not updated right when modifying shaders and some operations may replace it with nulls: godot.windows.editor.dev.x86_64_PfbFzWf1sD.mp4Other than that they look functional, which is nice. |
cb7e597
to
49b0ac9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally (rebased on top of master
99a7a9c), it works as expected in Forward+ and Mobile.
When running in Compatibility, you get a shader compilation error like in 3D (as expected):
SHADER ERROR: Uniform instances are not supported in gl_compatibility shaders.
Testing project: test_pr_97058.zip
PS: What is this checkbox for? It's present for both 3D and 3D per-instance uniforms. I can't uncheck it (nothing happens when I click it), regardless of whether the value is modified from its default or not.
Don't know, I think it was like that in 4.2 as well. |
To update property list, you need to use godot/scene/3d/visual_instance_3d.cpp Lines 244 to 246 in 02b16d2
However modifying shader does not add the CanvasItem to _instance_update_list , I think it also has to be done manually.The parameters no longer become null, so the list not updating is only an inconvenience now. Also if you want the instance parameters to have revert button, you need to implement |
9e9820d
to
88316b9
Compare
88316b9
to
8687e49
Compare
Redid everything from the ground up, refactored all the common code into a class. Everything should work identically to the 3D instances now. |
8687e49
to
cb70b7b
Compare
736081e
to
db276ca
Compare
db276ca
to
045b5cf
Compare
Please squash the commits as it's required by our pipeline (see https://docs.godotengine.org/en/latest/contributing/workflow/pr_workflow.html). |
Do I need to do anything special to keep the other contributor's names or do I just squash? |
You will need to have the "Co-Authored by:" lines for both of them (one is already there). I suggest waiting to squash until you are finished with the PR and it is ready to merge. |
3e740af
to
6cd556f
Compare
Any idea on if/when this will get added to the main branch? |
Depends on #97340. Soon as it's merged, I'll submit the final revision and then it's in the hands of the maintainers. |
6cd556f
to
c59b1bb
Compare
Co-authored-by: Álex Román Núñez <eirexe123@gmail.com> and KoBeWi
c59b1bb
to
6b34ceb
Compare
It's finished. But they want compat renderer support added. Someone else can do that, I'm tired. |
Is there any chance can we merge this and leave the compact renderer support for future contributors? |
It will at least need a warning that Compatibility is not supported. |
From KoBeWi to EIREXE to here. Issue #62943.
instvartest.zip
Now feature complete with the exception of compatibility renderer.