PySoy: Shader Collision Storage
completed by: Samuel Kim
mentors: Arc Riley
As we work our way into shader-based physics, we need basic body data in each Scene stored as texture data. Immediately before collision detection, copy the following data for each body into a 1D float texture;
- position x
- position y
- position z
- radius squared
The radius squared of two respective bodies will be compared to distance squared to determine whether the two bodies may be colliding. For a Box
, use one of the outer edges of the box as the radius.
There will have to be some way to reference a body from a given position when the output texture is returned from the GPU.
While working on this task you should join and remain in #PySoy on Freenode to get help, feedback, and guidance from mentors and other developers. Code updates which may affect your work are also announced here as they happen.
When you've done, commit your work and post the resulting changeset url to this task.