-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Improve shader function descriptions #9338
base: master
Are you sure you want to change the base?
Conversation
Pull request for issue #9310 |
CC @clayjohn |
That was unbelievably fast. I'm going to need a few days to review this. But I am very excited! |
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.
This looks good, gonna go through it for style again but this was some that stuck out for now
Co-authored-by: Yuri Rubinsky <[email protected]> Co-authored-by: A Thousand Ships <[email protected]>
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.
Amazing work! This looks really good so far.
I think I just have two general comments:
- I agree with Chaosus' comment earlier that, in most cases, functions with the same name should be grouped instead of duplicated. Especially for functions with really long descriptions.
- I like how you kept the short description in the table. But I think it needs to be truly a short description. Some of the entries have the entire description copied in the table and that ends up making the table bloated in hard to navigate.
In these cases, the table actually has more information than the long description below.
Awesome! I'm glad you like it. I'm pushing hard to finish a project milestone this week, but I should be able to work on an update next week. |
Co-authored-by: A Thousand Ships <[email protected]>
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.
Did a grammar and spelling check and everything looks good.
I didn't do a whole review, but I skimmed and caught some typos. I also noticed no consistency of "Return" vs "Returns" or "Calculate" vs "Calculates" in the descriptions of functions, but I don't think that's really worth the effort to standardize. |
Co-authored-by: tetrapod <[email protected]>
Co-authored-by: tetrapod <[email protected]>
Co-authored-by: tetrapod <[email protected]>
@tetrapod00 Any thoughts on the conversation @clayjohn and I were having about functions working on arrays piecewise? |
Latest commit addresses concerns about component-wise functions and operators. It also improves some formatting and fixes some oddities with the navigation tree. Here's a bulleted list of what I changed:
|
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.
Otherwise I think this looks good
I see a lot of places where style can be improved in a minor way, like styling literals as code and with a decimal marker for floats (e.g. |
I started on a nitpicky style review but I think it would be better as a followup PR - making all the required changes is annoying as suggestions. IMO the style inconsistency is not bad enough to prevent merging as is. |
Should have stated functions are based on GLSL ES 3.0 (GLSL != GLSL ES)
Ok, fixed the couple things you already mentioned since I needed to fix my GLSL 4.0 mistake. I'm more than happy to let you fix the rest of the tedious formatting issues in another PR. What does the merge process look like from here? We wait for ClayJohn or some such to come give a final approval and pull it in? |
Yeah, now you're waiting on another review from clayjohn or someone else with shader-specific knowledge to do a high-level review including whatever other style nitpicks come up in that review, then it should be merge-able. IMO this PR is already so much better than the current state of the function docs that this PR is merge-able as-is. (Also I believe in most cases we would address the style consistency in this PR, not a followup, but it is really tedious work on a large PR, it's not blocking, and I'm volunteering to do it) |
Adds much detail to the documentation on built-in shader functions, copied from (with a few modifications) and linked to official GLSL documentation.
That documentation was moved into a separate file due to its verbosity, and organized into smaller sections following the organizational comments in https://github.com/godotengine/godot/blob/master/servers/rendering/shader_language.cpp.
Style tries to generally follow the styling used in class documentation, but differences between .gdshader and .gdscript meant some changes had to be made.