-
-
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
Major update for visual shader system #26164
Conversation
e61c024
to
bf75d51
Compare
c703aff
to
f63cb34
Compare
2a615c2
to
5709c95
Compare
So if you clicked on Node(by mouse) you just want to immediate focus on Search ? Currently focus on search does not allows you to press Enter to add node - it just filter the entire list for the comparsion - and after that you should choose the required one - after that there are 3 ways for add a node 1) Create button, 2) Hit Enter 3) Double mouse Click |
This looks seriously amazing. I would also make the type icons remain there as default, no need for a toggle. |
Great!
Will fix it tomorrow.. |
There's currently a shader docs PR at godotengine/godot-docs/pull/2323 but it doesn't include any visual shader content (yet). Merging this would be a great time to add one. It's going to need a lot of screenshots, though, so I'd recommend waiting until it's merged in case of any last-minute changes. |
@cbscribe Yes, of course, will wait if its needed Can you check the shader nodes descriptions on editor/plugins/visual_shader_editor_plugin.cpp - majority of them has been taken from official OpenGL site however I changed them a bit.. Also, should I need to add xml docs for new classes (there are plenty of them) or they are generated automatically or something ? |
3cba339
to
f66b871
Compare
I've added drag&drop - I found it is very useful method to add nodes to the graph The only downside is (currently) you cannot interact with added nodes without closing dialog due to PopupDialog limitation(please correct me if im wrong), however you can delete them without closing dialog by using CTRL+Z(undo) |
f66b871
to
a283a96
Compare
@Chaosus couldn't you simply hide or disable the "Fragment" category when in vertex mode (and the other way around), instead of displaying an error message when you drag a wrong node ? |
@groud yeah, good point, will fix it soon.. |
a283a96
to
a1c01b6
Compare
Ok, now Vertex/Fragment/Light in Input will show only in associated mode, also "Special" will not show in Vertex mode cuz its currently have only Derivative functions which are not supported by vertex anyways |
Im back after a few weeks and mate, you're even more of a legend! My jaw dropped so hard my neighbours form three floors down had to bring it to me. |
b7983d8
to
62b2e79
Compare
62b2e79
to
5fd671b
Compare
Thanks a ton! |
It got merged in! Wow! |
This looks amazing :) I want to cry. I just have a brief look so I don't know whether some improvements are already included. Would you like to have a look at some github issues related to the visual shader system. Here's one of them for example :#21662 |
Well, I can look at them and solve, from time to time ^^ |
This is great stuff, but I wonder if anyone will look into the usability updates suggested here: |
@spyres Thanks for your interest, but this PR is closed. If you would like to suggest enhancements please open an issue laying out what you would like to see changed in text. Posting a video is not helpful for other contributors. Please also note that the video you provided was made before this PR was merged and does not reflect the current state of the visual shader system. |
I know you guys like visual shaders so I've decided to attempt to improve it.
And with the proposed changes it will be possible to create much more complex effects.
1. Redesigned Add menu
All of items in the tree are sorted alphabetically
Can be resized for best looking, and save its transform for next time user called it
Have options to collapse and expand all items
Called by right-click as usual
Will create node at last cursor position instead always center
The Add nodes... button remains its functionality - dialog has been placed on the top left corner and created node pushed to center as it was
2. New functions.
Several new API functions from glsl has been pushed to visual shaders.
I also exposed all scalar functions to Vector.
Almost all GLSL functions now be available for developers !
Exposed Input's for easy access - category Input will contains all the inputs for different types of shader modes. Dont worry the parameters which are exist in all three shader modes(Fragment, Light or Vertex) will be under "All" sub-dir..
Clicking on each one just created Input node with specified parameter
New API :
These nodes can be translated to scalar or vector and can be useful to achive some effects based on boolean logic.
TransformFunc - Contains Inverse and Transpose
ScalarDerivative and VectorDerivative - Contains Ddx(dFdx), Ddy(dFdy), Sum(fwidth)
New Builtins :
Exposed to VectorFunc :
Separate classes which has been added into core :
Notes :
Majority of new functions reused standart classes such as ScalarFunc or VectorFunc.
So for example if you click on Cos under scalar section - it will create a ScalarFunc with Cos parameter
I tried to achive backward compatibility - all new functions added above existed
I opened for any acceptable critic and will improve this PR to end (merge) :) Please suggest your fixes or ideas.
Where is a demo ? - https://youtu.be/wZRL2UpIDGo
Fixes :