jonathanhogg / flitter

A functional programming language and declarative system for describing 2D and 3D visuals
https://flitter.readthedocs.io
BSD 2-Clause "Simplified" License
34 stars 1 forks source link

Rewrite `!physics` computation code as an OpenGL compute shader? #29

Open jonathanhogg opened 6 months ago

jonathanhogg commented 6 months ago

This would require OpenGL 4.3, but would obviously allow for significant performance gains. One could, perhaps, retain the CPU implementation and only attempt use of a compute shader if ARB_compute_shader is present.

More on compute shaders here:

https://www.khronos.org/opengl/wiki/Compute_Shader

and a moderngl example here:

https://github.com/moderngl/moderngl/blob/main/examples/compute_shader_ssbo.py