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

Adding example code for compute shaders #6159

Merged

Conversation

dotlogix
Copy link
Contributor

@dotlogix dotlogix commented Sep 9, 2022

Hey there this is my first contribution to godot :)

Lately I used compute shaders and was missing some documentation, so I decided to write one after I understood how it works by trial and error.

Please ahave a look and give me suggestions how to improve the documentation.
If this one works out I would like to add also more advanced tutorials for other use cases.

@clayjohn clayjohn added content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features topic:rendering labels Sep 9, 2022
@clayjohn clayjohn added this to the Godot 4.0 milestone Sep 9, 2022
@dotlogix dotlogix marked this pull request as ready for review September 9, 2022 18:58
@dotlogix
Copy link
Contributor Author

dotlogix commented Sep 9, 2022

Hey there @Calinou sorry for the inconvenience the previous version was broken.
I found a way to test it locally now :)

For a first version I am happy with the outcome but unfortunately english is not my main language so I hope there are some nice ones who could proofread my tutorial.

I could also attach some images or the final code, but I don't know what the process here is :)

Thx for taking your time

@dotlogix dotlogix force-pushed the Features/ComputeShader_Tutorial branch 3 times, most recently from d8c39f2 to dcd793a Compare September 9, 2022 22:10
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great start! I have made many language suggestions and clarifications. Please let me know if the suggested changes make sense or if you have any questions for me.

tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
@dotlogix dotlogix force-pushed the Features/ComputeShader_Tutorial branch from f40b042 to 7c2bdf9 Compare September 19, 2022 20:35
@dotlogix
Copy link
Contributor Author

@clayjohn thanks a lot for your suggestions as you may noticed I tried my best, but my english is not the best. I committed your suggetsions and sqashed the changes another time.
I also added a bit more information about accessing memory outside of your control.

Please have another look <3

@Dayruke
Copy link

Dayruke commented Sep 21, 2022

From someone who is probably the target audience, I'll suggest the presence of Additional Resources. Like "next steps" after the reader understands your tutorial.

If you've noted some gems out on the web that have helped you wrap your head around when to use and how to win with compute shaders, I'd like to find them here. For one thing, if there are limitations to how Godot handles CS, the resources I find in a web search could lead me astray because they're not considering those limitations.

For examples of Additional Resources, see the youtube links at the end section of Matrices and Transforms. Resources could accumulate near the end, like that example, or appear beside relevant text.

(Godot Docs has a Tutorials and Resources section, but I think the CS topic is too specific for that page)

Great work on this! I think you're adding a vital piece of documentation for Godot 4.

@dotlogix dotlogix force-pushed the Features/ComputeShader_Tutorial branch from 7c2bdf9 to efc9799 Compare September 21, 2022 17:05
@dotlogix
Copy link
Contributor Author

Thanks for your opinion @Dayrook unfortunately there are no tutorials out yet so they can't be included in this PR.
In the near future I plan to create extended and more complex scenarios but don't know when I have time to do so :)

@Dayruke
Copy link

Dayruke commented Sep 21, 2022

I didn't mean Godot CS tutorials. Here's an example of what I mean:

More information on how memory is handled is available on the OpenGL Wiki Compute Shader article

Stuff like that would give the reader good places to dig deeper once they've absorbed your tutorial.

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good now! I have made a few more suggestions that I missed on the last round of reviews

tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
tutorials/shaders/compute_shaders.rst Outdated Show resolved Hide resolved
@dotlogix dotlogix force-pushed the Features/ComputeShader_Tutorial branch from 4a960e1 to 245544f Compare September 23, 2022 13:03
@dotlogix
Copy link
Contributor Author

This is looking pretty good now! I have made a few more suggestions that I missed on the last round of reviews

Thanks a lot for all of your suggestions I merged them and squashed the commits again :)

Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it looks great now! Thank you

@dotlogix
Copy link
Contributor Author

@clayjohn who is responsible to merge this PR? I don't have rights to do so myself

@paddy-exe
Copy link
Contributor

@dotlogix Several people can merge commits. Master of commit mergers is Rémi aka @akien-mga

@clayjohn
Copy link
Member

@dotlogix To add to what paddy-exe said. One of the other Documentation team members will give this a brief review and merge it if they don't find issues that I missed. There should be no need for action on your part unless someone else requests changes

@mhilbrunner mhilbrunner merged commit b196bcb into godotengine:master Oct 11, 2022
@mhilbrunner
Copy link
Member

Thank you - congrats on your first docs contribution, and it's a sizeable one at that! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:new page Issues and PRs related to creation of new documentation pages for new or undocumented features enhancement topic:rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants