Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clarify compute shader N-body tutorial (#1798)
* Use a more manageable default size for the screen * Set resizable to false to play safe with tiling WMs * Make the tutorial friendlier to low-end systems by using fewer particles * Use a top-level constant to control the number of stars * Make naming consistent, ie stars instead of balls * s/effected/affected/ + phrasing tweak in same sentence * Use self.position instead of .center_x, .center_y * Change the window title to be clearer * s/ball/star/g in the computer shader example's glsl * Improve clarity by renaming buffer variables and updating comments * Clean up buffer initialization by using a nested function * Use standard conditional execution for the example * Add units to comments * Make phrasing consistent in program parts list * Explain templating behavior at the top of the compute shader * Use pathlib.Path.read_text instead of longer with statememnts * Add comments explaining input variables to compute shaders * Randomize star color to make movement visualization easier * Incorporate feedback from discord discussion * Use clearer names for the buffers * Clarify a comment * Add missing "the" to increase smoothness * Add notes on vec3 being fake based on discussion with @einarf * Extend comment to support the .rst file * Rephrase label in SVG diagram * Move initial data generation into separate function to make indent cleaner * Clean up the top of the tutorial's __init__ * Update file docstring, window title, and class name * Remove unused instance variable & reorganize code for easier inclusion in .rst * Initialize both ssbo buffers with the same data to start with * Add section on buffer allocation to computer shader tutorial * Tweak tutorial intro phrasing * Tweak buffer opening phrasing * Add index to SVG diagram label to indicate parallel iteration * Subdivide visualization section with headings + touch up Vertex & Geometry shader sections * Make ordering of variables identical across doc, vertex, and geometry shader * Improve clarity of Geometry Shader section & GLSL * Clean up rst description of geometry & fragment shaders * Finish first full rework draft * Make star color togglable & off by default to match the embedded video * Update example portion line numbers * Fix an ambiguous comment in compute shader * Fix plural in heading
- Loading branch information