Skip to content

DrJamgo/GodotGLES2Boids

Repository files navigation

Godot GLES2 Boids

Intro

This is a Boids algorithm imlementaiton for Godot Game Engine 3.x, using GLES2 features only.

Base Principle

(Re)implementation of previous GPU accelerated Boids algorithm for Godot game engine. Again, using fragment shaders (due to lack of OpenCL or computer shader access) for general-purpose processing.
It uses a double-buffered texture as strorage for all particle states to update and feedback as input next render cycle.
See a video on Reddit here

Constraints

These are the contraints for the project, due to exclusive use of GLES2

No Compute shaders

The boids computation (= particles) is done on a fragment shader BoidsShader.gdshader

No float textures as render target

This is not supported on all devices, thus the render target is always RGBA8888 output. Higher precision is needed for particle position though, thus the position is encoded in 16bit fixed point values. See rgba_to_world and world_to_rgba

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published