Skip to content

Clarify compute shader N-body tutorial #1798

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

Merged

Conversation

pushfoo
Copy link
Member

@pushfoo pushfoo commented May 25, 2023

Changes

  • Add optional star color to make movement visualization easier
  • Rephrase tutorial page, replacing "ball" with "star" in Python & shader source to be consistent with the example theme
  • Lower default resolution to accommodate smaller screens
  • Lower default number of stars to accommodate weak GPUs
  • Add top level constant + units in comments on existing top-level constants
  • Reorganize code to follow tutorial's structure
  • Clarify comments & docstrings
  • Update Window title to match top level docstring

Why

This addresses issues I found while reading the code to understand #1782.

How to Test

  1. Run ./make.py serve
  2. Go to http://localhost:8000/tutorials/compute_shader/index.html
  3. Proof read for accuracy
  4. Run main.py in the example folder to make sure nothing new is broken, only the movement issues previously reported

Follow-up work

  1. Attempt a fix for Mistake in compute shader example #1782
  2. (TBD / uncertain) Compact this example to use a more efficient layout in memory?
  3. (TBD/ uncertain) Separate into steps like other tutorials?

pushfoo added 30 commits May 25, 2023 15:59
@pushfoo pushfoo changed the title WIP: Improve legibility of stars compute shader tutorial Clarify compute shader n-body tutorial May 28, 2023
@pushfoo pushfoo marked this pull request as ready for review May 28, 2023 05:48
@pushfoo pushfoo changed the title Clarify compute shader n-body tutorial Clarify compute shader N-body tutorial May 28, 2023
@pvcraven pvcraven merged commit 809dbe3 into pythonarcade:development May 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants