nstgeorge / VEKTA

A space exploration game created in Processing 3 with orbital mechanics
MIT License
1 stars 1 forks source link

Add compute shaders for calculating gravitational effects #55

Closed nstgeorge closed 3 years ago

nstgeorge commented 4 years ago

One major limiting factor for performance is the millions of calculations required every frame (or physics tick) to figure out where every object should be. If we can parallelize this system, I expect we will gain enormous performance improvements, particularly on systems with discrete GPUs.

I'm currently looking into systems that have bindings for Java. https://blogs.oracle.com/javamagazine/programming-the-gpu-in-java

nstgeorge commented 3 years ago

With the addition of our debug frame timer, we figured out that gravity calculations take almost no time. Closing for now, might reopen if we can optimize draw times and want to add huge numbers of objects in small areas.